06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

pSOS+ <strong>System</strong> <strong>Calls</strong> tm_get<br />

tm_get Obtains the system’s current version of the date and time.<br />

#include <br />

unsigned long tm_get(<br />

unsigned long *date, /* year/month/day */<br />

unsigned long *time, /* hour:minute:second */<br />

unsigned long *ticks /* ticks */<br />

)<br />

Description<br />

Arguments<br />

Return Value<br />

This service call returns the system’s current version of the date and time-of-day. If<br />

the system has no real-time clock, the returned values are meaningless.<br />

date Points to the variable where tm_get() stores the date. date is<br />

encoded as follows:<br />

Field Bits<br />

Year, A.D. 31-16<br />

Month (1-12) 15-8<br />

Day (1-31) 7-0<br />

time Points to the variable where tm_get() stores the time. time is<br />

encoded as follows:<br />

Field Bits<br />

Hour (0-23) 31-16<br />

Minute (0-59) 15-8<br />

Second (0-59) 7-0<br />

ticks Points to the variable where tm_get() stores the number of ticks<br />

from the last second of the time argument.<br />

This system call returns 0 on success, or an error code on failure.<br />

<strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong> 1-173<br />

1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!