source: azure_iot_hub_f767zi/trunk/azure_iot_sdk/c-utility/adapters/agenttime_mbed.c@ 457

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

ファイルを追加

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-csrc;charset=UTF-8
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.