| The Gaudi Framework v32r1 (f65d50dc)

time_r.h
Go to the documentation of this file.
1 #ifndef GAUDIKERNEL_TIME_R_H
2 #define GAUDIKERNEL_TIME_R_H
3
4 #include <ctime>
5
6 /*
7 This header file provides the functions localtime_r and time_r (available on Linux)
8 to the Win32 platform.
9
10 Marco Clemencic
11 */
12
13 #ifdef _WIN32
14
15 extern "C" {
16 inline struct tm* localtime_r( const time_t* sec, struct tm* result ) {
17 localtime_s( result, sec );
18 return result;
19 }
20 inline struct tm* gmtime_r( const time_t* sec, struct tm* result ) {
21 gmtime_s( result, sec );
22 return result;
23 }
24 }
25
26 #endif
27
28 #endif // GAUDIKERNEL_TIME_R_H