Mark Radbourne / Mbed 2 deprecated FXOS8700CQ_To_Azure_IoT

Dependencies:   azure_umqtt_c iothub_mqtt_transport mbed-rtos mbed wolfSSL Socket lwip-eth lwip-sys lwip

Embed: (wiki syntax)

« Back to documentation index

agenttime.h File Reference

agenttime.h File Reference

Function prototypes for time related functions. More...

Go to the source code of this file.

Functions

 MOCKABLE_FUNCTION (, time_t, get_time, time_t *, currentTime)
 Get current calendar time.
 MOCKABLE_FUNCTION (, struct tm *, get_gmtime, time_t *, currentTime)
 Get UTC in tm struct.
 MOCKABLE_FUNCTION (, time_t, get_mktime, struct tm *, cal_time)
 Get current time representation of the given calendar time.
 MOCKABLE_FUNCTION (, char *, get_ctime, time_t *, timeToGet)
 Gets a C-string representation of the given time.
 MOCKABLE_FUNCTION (, double, get_difftime, time_t, stopTime, time_t, startTime)
 Gets the difference in seconds between stopTime and startTime.

Detailed Description

Function prototypes for time related functions.

These functions are implemented with C standard functions, and therefore they are platform independent. But then a platform can replace these functions with its own implementation as necessary.

Definition in file agenttime.h.


Function Documentation

MOCKABLE_FUNCTION ( time_t  ,
get_time  ,
time_t *  ,
currentTime   
)

Get current calendar time.

This function provides the same functionality as the standard C time() function.

MOCKABLE_FUNCTION ( double  ,
get_difftime  ,
time_t  ,
stopTime  ,
time_t  ,
startTime   
)

Gets the difference in seconds between stopTime and startTime.

This function provides the same functionality as the standard C difftime() function.

MOCKABLE_FUNCTION ( char *  ,
get_ctime  ,
time_t *  ,
timeToGet   
)

Gets a C-string representation of the given time.

This function provides the same functionality as the standard C ctime() function.

MOCKABLE_FUNCTION ( time_t  ,
get_mktime  ,
struct tm *  ,
cal_time   
)

Get current time representation of the given calendar time.

This function provides the same functionality as the standard C mktime() function.

MOCKABLE_FUNCTION ( struct tm *  ,
get_gmtime  ,
time_t *  ,
currentTime   
)

Get UTC in tm struct.

This function provides the same functionality as the standard C gmtime() function.