30.12.2013 Views

T-Kernel Specification (1.B0.02)

T-Kernel Specification (1.B0.02)

T-Kernel Specification (1.B0.02)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

4.7. TIME MANAGEMENT FUNCTIONS 165<br />

tk set tim<br />

Set Time<br />

[C Language Interface]<br />

ER ercd = tk_set_tim ( SYSTIM *pk_tim ) ;<br />

[Parameters]<br />

SYSTIM* pk tim Address of current time packet<br />

pk tim detail:<br />

SYSTIM systim Current system time<br />

[Return Parameters]<br />

ER ercd Error code<br />

[Error Codes]<br />

E OK<br />

E PAR<br />

Normal completion<br />

Parameter error (pk tim is invalid, or time setting is invalid)<br />

[Description]<br />

Sets the system clock to the value designated in systim.<br />

System time is expressed as cumulative milliseconds from 0:00:00 (GMT), January 1, 1985.<br />

[Additional Notes]<br />

The relative time designated in RELTIM or TMO does not change even if the system clock is changed by<br />

calling tk set tim during system operation. For example, if a timeout is set to elapse in 60 seconds and<br />

the system clock is advanced by 60 seconds by tk set tim while waiting for the timeout, the timeout<br />

occurs not immediately but 60 seconds after it was set. Instead, tk set tim changes the system time<br />

at which the timeout occurs.<br />

Copyright c○ 2002, 2003 by T-Engine Forum<br />

T-<strong>Kernel</strong> <strong>1.B0.02</strong>

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

Saved successfully!

Ooh no, something went wrong!