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: EthernetInterface NTPClient iothub_amqp_transport iothub_client mbed-rtos mbed
Fork of iothub_client_sample_amqp by
agenttime_mbed.c
00001 // Copyright (c) Microsoft. All rights reserved. 00002 // Licensed under the MIT license. See LICENSE file in the project root for full license information. 00003 00004 #include "azure_c_shared_utility/agenttime.h" 00005 00006 // mbed version of gmtime() returns NULL. 00007 // system RTC should be set to UTC as its localtime 00008 00009 time_t get_time(time_t* currentTime) 00010 { 00011 return time(currentTime); 00012 } 00013 00014 double get_difftime(time_t stopTime, time_t startTime) 00015 { 00016 return difftime(stopTime, startTime); 00017 } 00018 00019 00020 struct tm* get_gmtime(time_t* currentTime) 00021 { 00022 return localtime(currentTime); 00023 } 00024 00025 char* get_ctime(time_t* timeToGet) 00026 { 00027 return ctime(timeToGet); 00028 }
Generated on Tue Jul 12 2022 12:43:15 by
