OSTicksToMilliseconds

Syntax

#include <cafe/os.h>

#define OSTicksToMilliseconds(ticks) ((((u64)(ticks)) * 1000ULL) / ((u64) OS_TIMER_CLOCK))

Parameters

ticks OSTime (64-bit) or OSTick (32-bit) type integer value.

Return Values

Time in milliseconds.

Description

Converts time from ticks (at OS_TIMER_CLOCK Hz) to milliseconds.

NOTE:
  • Milliseconds 64-bit conversion overflow occurs approximately every 3400 days.
  • This function should not be used to determine long durations such as wall clock time. It is intended to be used for short durations because it is subject to truncation in approximately n days. See OSTicksToCalendarTime.

Do Not Call From

None.

See Also

OSTicksToCycles
OSTicksToSeconds
OSTicksToMicroseconds
OSTicksToNanoseconds
OSSecondsToTicks
OSMillisecondsToTicks
OSMicrosecondsToTicks
OSNanosecondsToTicks

Revision History

2013-05-08 Automated cleanup pass.
2012-08-01 Cleanup Pass
2012-05-25 Match actual prototype.
2010-08-30 Initial version.


CONFIDENTIAL