iochar_tick_cnt()

Calculate tick count

Synopsis:

#include <sys/io-char.h>

unsigned int iochar_tick_cnt( const unsigned int time_ms,
                              unsigned int *error_ms );

Arguments:

time_ms
The period of time in milliseconds.
error_ms
Returns the absolute delta from time_ms period requested if not NULL.

Description:

The iochar_tick_cnt() function calculates the tick count to achieve time_ms based on the currently configured tick size. Fill error_ms with the absolute delta from the requested time.

Returns:

The number of ticks to achieve a period as close to time_ms as possible with the configured ticksize_ms.

Page updated: