#include <nitro/os.h>
OS_TicksToMicroSeconds( tick )
OS_TicksToMilliSeconds( tick )
OS_TicksToSeconds( tick )
This function obtains the actual time that corresponds to the tick value that is specified in the argument.
One tick unit is 1/64 of the system clock.
OS_TicksToMicroSeconds() converts the tick value to microseconds.
OS_TicksToMilliSeconds() converts the tick value to milliseconds.
OS_TicksToSeconds() converts the tick value to seconds.
The conversion macro is as follows.
#define OS_TicksToMicroSeconds( tick ) \
( ((tick) * 64 * 1000 / (OS_TIMER_CLOCK/1000) )
#define OS_TicksToMilliSeconds( tick ) \
( ((tick) * 64) / (OS_TIMER_CLOCK/1000) )
#define OS_TickToSeconds( tick ) \
( ((tick) * 64) / OS_SYSTEM_CLOCK )
Note:The OS_SYSTEM_CLOCKis 33514000.
tick |
The tick value |
The actual time that corresponds to the tick value that is specified in the argument.
OS_InitTick, OS_GetTick,
OS_SetAlarm,
OS_SetPeriodicAlarm,
OS_*SecondsToTicks
02/25/2004 Changed Count -> Tick
02/24/2004 Initial Version