source: azure_iot_hub/trunk/azure_iohub/c-utility/adapters/agenttime_mbed.c@ 388

Last change on this file since 388 was 388, checked in by coas-nagasima, 5 years ago

Azure IoT Hub Device C SDK を使ったサンプルの追加

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-csrc
File size: 621 bytes
Line 
1// Copyright (c) Microsoft. All rights reserved.
2// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
4#include "azure_c_shared_utility/agenttime.h"
5
6// mbed version of gmtime() returns NULL.
7// system RTC should be set to UTC as its localtime
8
9time_t get_time(time_t* currentTime)
10{
11 return time(currentTime);
12}
13
14double get_difftime(time_t stopTime, time_t startTime)
15{
16 return difftime(stopTime, startTime);
17}
18
19
20struct tm* get_gmtime(time_t* currentTime)
21{
22 return localtime(currentTime);
23}
24
25char* get_ctime(time_t* timeToGet)
26{
27 return ctime(timeToGet);
28}
Note: See TracBrowser for help on using the repository browser.