AWS IoT Device SDK C: Platform
Platform portability layer
Return to main page ↑
IotClock_GetTimeMs

Returns a nonzero, monotonically-increasing system time in milliseconds.

uint64_t IotClock_GetTimeMs( void );

This function reads a millisecond-resolution system clock. The clock should always be monotonically-increasing; therefore, real-time clocks that may be set by another process are not suitable for this function's implementation.

Returns
The value of the system clock. This function is not expected to fail.

Example

// Get current time.
uint64_t currentTime = IotClock_GetTimeMs();