| 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 <time.h> |
| 5 |
#include "azure_c_shared_utility/gballoc.h" |
| 6 |
#include "azure_c_shared_utility/agenttime.h" |
| 7 |
|
| 8 |
time_t get_time(time_t* p) |
| 9 |
{ |
| 10 |
return time(p); |
| 11 |
} |
| 12 |
|
| 13 |
struct tm* get_gmtime(time_t* currentTime) |
| 14 |
{ |
| 15 |
return gmtime(currentTime); |
| 16 |
} |
| 17 |
|
| 18 |
time_t get_mktime(struct tm* cal_time) |
| 19 |
{ |
| 20 |
return mktime(cal_time); |
| 21 |
} |
| 22 |
|
| 23 |
char* get_ctime(time_t* timeToGet) |
| 24 |
{ |
| 25 |
return ctime(timeToGet); |
| 26 |
} |
| 27 |
|
| 28 |
double get_difftime(time_t stopTime, time_t startTime) |
| 29 |
{ |
| 30 |
return difftime(stopTime, startTime); |
| 31 |
} |