Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: azure_umqtt_c iothub_mqtt_transport mbed-rtos mbed wolfSSL Socket lwip-eth lwip-sys lwip
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.
Generated on Wed Jul 13 2022 07:19:04 by
1.7.2