summaryrefslogtreecommitdiffstats
path: root/common/os_calls.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/os_calls.c')
-rw-r--r--common/os_calls.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/common/os_calls.c b/common/os_calls.c
index 45b60bd7..088424ec 100644
--- a/common/os_calls.c
+++ b/common/os_calls.c
@@ -42,6 +42,7 @@
#include <signal.h>
#include <fcntl.h>
#include <pwd.h>
+#include <time.h>
#endif
#include <stdlib.h>
@@ -1000,3 +1001,16 @@ g_getuser_info(char* username, int* gid, int* uid, char* shell, char* dir,
#endif
return 0;
}
+
+/*****************************************************************************/
+/* returns the time since the Epoch (00:00:00 UTC, January 1, 1970),
+ measured in seconds. */
+int
+g_time1(void)
+{
+#if defined(_WIN32)
+ return 0;
+#else
+ return time(0);
+#endif
+}