06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

tm_set Sets or resets the system’s version of the date and time.<br />

#include <br />

unsigned long tm_set(<br />

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

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

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

)<br />

Description<br />

Arguments<br />

This service call enables a task either to set or reset the system's version of the date<br />

and time. If a meaningful date and time are required, this call should be made after<br />

each system restart or power-on. Thereafter, the system maintains the date and<br />

time based on incoming tm_tick() calls and the expected arrival frequency defined<br />

in the pSOS+ Configuration Table.<br />

date Specifies the clock date. date is 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 Specifies the clock time. time is 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 Specifies the number of ticks from the last second of the time<br />

argument.<br />

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

1

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

Saved successfully!

Ooh no, something went wrong!