OS_SecondsToTicks

# OS_*SecondsToTicks

## C Specification

      #include <nitro/os.h>

      OS_SecondsToTicks( sec )
      OS_MilliSecondsToTicks( milliSec )
      OS_MicroSecondsToTicks( microSec )

## Description

This function obtains the tick value that corresponds to the time specified by the argument. One tick unit is 1/64 of the system clock.
`OS_MicroSecondsToTicks()` converts microseconds to a tick value.
`OS_MilliSecondsToTicks()` converts milliseconds to a tick value.
`OS_SecondsToTicks()` converts seconds to a tick value.
The conversion macro is as follows.

> `#define OS_MicroSecondsToTick( msec ) \
> ( ((OS_SYSTEM_CLOCK/1000) * (msec)) / 64 / 1000 )
> #define OS_MilliSecondsToTicks( msec ) \
> ( ((OS_SYSTEM_CLOCK/1000) * (msec)) / 64 )
> #define OS_SecondsToTicks( sec ) \
> ( (OS_SYSTEM_CLOCK * (sec)) / 64 )
> ` Note: The `OS_SYSTEM_CLOCK` is 33514000.

## Arguments

`sec` | Seconds
`milliSec` | Milliseconds
`microSec` | Microseconds

## Return Values

The tick value that corresponds to the time specified by the argument.

## See Also

`OS_InitTick, OS_GetTick, OS_SetAlarm, OS_SetPeriodicAlarm, OS_TicksTo*Seconds
`

## Revision History

02/25/2004 Changed Count -> Tick
02/24/2004 Initial Version