1.5.4.4.2 SRV_TIME_MANAGEMENT_GetTimeUS Function

C

uint32_t SRV_TIME_MANAGEMENT_GetTimeUS(void);

Summary

Gets the value of a counter and converts it to a 32 bit variable in microseconds.

Description

This routine makes use of SYS_TIME service to get the value of the microseconds counter in order to be able to set timeouts and perform delays. This function returns the current value of such counter.

Precondition

SYS_TIME_Initialize routine must have been called before.

Parameters

None.

Returns

Value of microseconds in 32 bits.

Example

uint32_t previousTimeUS = SRV_TIME_MANAGEMENT_GetTimeUS();

uint32_t newTimeUS = SRV_TIME_MANAGEMENT_GetTimeUS();

if ((newTimeUS - previousTimeUS) > 1000000)
{
}

Remarks

None.