Last change
on this file since 473 was 398, checked in by coas-nagasima, 5 years ago |
mbedTLS版Azure IoT Hub接続サンプルのソースコードを追加
|
-
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 |
|
---|
9 | time_t get_time(time_t* currentTime)
|
---|
10 | {
|
---|
11 | return time(currentTime);
|
---|
12 | }
|
---|
13 |
|
---|
14 | double get_difftime(time_t stopTime, time_t startTime)
|
---|
15 | {
|
---|
16 | return difftime(stopTime, startTime);
|
---|
17 | }
|
---|
18 |
|
---|
19 |
|
---|
20 | struct tm* get_gmtime(time_t* currentTime)
|
---|
21 | {
|
---|
22 | return localtime(currentTime);
|
---|
23 | }
|
---|
24 |
|
---|
25 | char* get_ctime(time_t* timeToGet)
|
---|
26 | {
|
---|
27 | return ctime(timeToGet);
|
---|
28 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.