summaryrefslogtreecommitdiff
path: root/otherlibs/unix/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'otherlibs/unix/time.c')
-rw-r--r--otherlibs/unix/time.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/otherlibs/unix/time.c b/otherlibs/unix/time.c
index f7916c991b..0c2d94ffd1 100644
--- a/otherlibs/unix/time.c
+++ b/otherlibs/unix/time.c
@@ -18,7 +18,12 @@
#include <caml/alloc.h>
#include "unixsupport.h"
+double unix_time_unboxed(value unit)
+{
+ return ((double) time((time_t *) NULL));
+}
+
CAMLprim value unix_time(value unit)
{
- return caml_copy_double((double) time((time_t *) NULL));
+ return caml_copy_double(unix_time_unboxed(unit));
}