# OS_InitTick

## C Specification

      #include <nitro/os.h>

      void OS_InitTick( void );

## Arguments

None.

## Return Values

None.

## Description

This function allocates a timer for ticks and initializes it. A tick is method of using a hardware timer to generate a u64 increment count. A tick is also the obtained value. Although the timer itself is 16 bits, in addition to the 16-bit cycle, which is one unit, there is also an internal counter. As a result it creates a 64-bit tick value. The system clock is `OS_SYSTEM_CLOCK` Hz. Therefore, a tick is `OS_SYSTEM_CLOCK` Hz/64 Hz. `OS_InitTick()` internally sets the tick value to zero. It is also possible to assume that the value obtained with `OS_GetTick` is the time from `OS_InitTick()`. A timer that is allocated to tick becomes system-reserved. A user cannot use it as a timer with `OS_SetTimer()` or the like. Do not call `OS_InitTick()` if you want the user to use all of the timers. Ticks are necessary when you use the alarm system. Call `OS_InitTick()` before the alarm system initialization declaration `OS_InitAlarm`.

## See Also

`OS_GetTick, OS_GetTickLo, OS_SetTick, OS_InitAlarm
`

## Revision History

02/25/2004 Changed `systemClock` to `tick`
02/04/2004 Initial Version

CONFIDENTIAL