aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/include/misc_os_dependent.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/epee/include/misc_os_dependent.h')
-rw-r--r--contrib/epee/include/misc_os_dependent.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/contrib/epee/include/misc_os_dependent.h b/contrib/epee/include/misc_os_dependent.h
index 0d09683d6..5fffde8d5 100644
--- a/contrib/epee/include/misc_os_dependent.h
+++ b/contrib/epee/include/misc_os_dependent.h
@@ -124,5 +124,14 @@ namespace misc_utils
return boost::lexical_cast<std::string>(pthread_self());
#endif
}
+
+ inline bool get_gmt_time(time_t t, struct tm &tm)
+ {
+#ifdef _WIN32
+ return gmtime_s(&tm, &t);
+#else
+ return gmtime_r(&t, &tm);
+#endif
+ }
}
}