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.

time pREPC+ <strong>System</strong> <strong>Calls</strong><br />

time Obtains the current calendar time.<br />

#include <br />

time_t time (<br />

time_t *timer /* buffer */<br />

)<br />

Description<br />

Arguments<br />

Return Value<br />

Error Codes<br />

Notes<br />

The time() function determines the current calendar time, expressed as the<br />

number of seconds since midnight January 1, 1970.<br />

timer Points to the buffer where time() can store the current calendar time.<br />

The time() function returns the implementation’s best approximation of the<br />

current calendar time. The value (time_t) -1 is returned if the calendar time is<br />

not available. If timer is not a null pointer, the return value is also assigned to the<br />

object it points to.<br />

Refer to Appendix B.<br />

This function invokes the pSOS+ service call tm_get() to obtain the current time.<br />

Callable From<br />

■ Task<br />

■ ISR<br />

3-174 <strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong>

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

Saved successfully!

Ooh no, something went wrong!