Mark Radbourne / Mbed 2 deprecated iothub_client_sample_amqp

Dependencies:   EthernetInterface NTPClient iothub_amqp_transport iothub_client mbed-rtos mbed

Fork of iothub_client_sample_amqp by Azure IoT

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers gb_time.c Source File

gb_time.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 /*depending if the symbol GB_TIME_INTERCEPT is defined, this file does the following
00005 
00006     a) if GB_TIME_INTERCEPT is NOT defined, then the file shall be empty (almost:)
00007     b) if GB_TIME_INTERCEPT is defined, then the file shall call to the 'real' time.h functions from their gb_* synonyms*/
00008 
00009 static const int avoid_a_warning_C4206 = 0; /* warning C4206: nonstandard extension used: translation unit is empty*/
00010 
00011 #ifdef GB_TIME_INTERCEPT
00012 
00013 #ifdef __cplusplus
00014 #include <ctime>
00015 #else
00016 #include <time.h>
00017 #endif
00018 
00019 #include "azure_c_shared_utility/gb_time.h"
00020 
00021 /*this is time*/
00022 time_t gb_time(time_t *timer);
00023 {
00024     return time(timer);
00025 }
00026 
00027 /*this is localtime*/
00028 struct tm *gb_localtime(const time_t *timer)
00029 {
00030     return gb_localtime(timer);
00031 }
00032 
00033 size_t gb_strftime(char * s, size_t maxsize, const char * format, const struct tm * timeptr)
00034 {
00035     return strftime(s, maxsize, format, timeptr);
00036 }
00037 
00038 #endif