CooCox CoOS User's Guide
CooCox CoOS User's Guide
CooCox CoOS User's Guide
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
6.3 Time Management<br />
6.3.1 CoGetOSTime()<br />
Function Prototype:<br />
U64 CoGetOSTime(void);<br />
Description:<br />
Obtain the current system time.<br />
Parameters:<br />
None<br />
Returns:<br />
The current system tick number.<br />
Example Usage:<br />
#include "CCRTOS.h"<br />
void TaskN (void *pdata)<br />
{<br />
U64 ostime;<br />
...<br />
ostime = CoGetOSTime();<br />
...<br />
}<br />
Note:<br />
None<br />
6.3.2 CoTickDelay()<br />
Function Prototype:<br />
StatusType CoTickDelay<br />
(<br />
U32 ticks<br />
);<br />
Description:<br />
Delay the task for a specified system tick number.<br />
Parameters:<br />
[IN] ticks<br />
The number of the system tick number to be delayed<br />
Returns:<br />
E_CALL, Called in the ISR.<br />
E_OK, Execute correctly.<br />
58