WIP. send a large constant string twice a second, in order to test out the transport with something indicative of our required load.

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

Fork of FXOS8700CQ_To_Azure_IoT by Mark Radbourne

azure_c_shared_utility/gb_time.c

Committer:
julianhigginson
Date:
2017-01-05
Revision:
7:0d1a0fe537dc
Parent:
3:c0556ff7b8e3

File content as of revision 7:0d1a0fe537dc:

// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

/*depending if the symbol GB_TIME_INTERCEPT is defined, this file does the following

    a) if GB_TIME_INTERCEPT is NOT defined, then the file shall be empty (almost:)
    b) if GB_TIME_INTERCEPT is defined, then the file shall call to the 'real' time.h functions from their gb_* synonyms*/

static const int avoid_a_warning_C4206 = 0; /* warning C4206: nonstandard extension used: translation unit is empty*/

#ifdef GB_TIME_INTERCEPT

#ifdef __cplusplus
#include <ctime>
#else
#include <time.h>
#endif

#include "azure_c_shared_utility/gb_time.h"

/*this is time*/
time_t gb_time(time_t *timer);
{
    return time(timer);
}

/*this is localtime*/
struct tm *gb_localtime(const time_t *timer)
{
    return gb_localtime(timer);
}

size_t gb_strftime(char * s, size_t maxsize, const char * format, const struct tm * timeptr)
{
    return strftime(s, maxsize, format, timeptr);
}

#endif