diff --git a/src/builtin_functions.c b/src/builtin_functions.c
index 3a999993450bef924c2b2956026446b444c9b5cf..0a4ceb2633b0aef400188a1b27839b4f02398658 100644
--- a/src/builtin_functions.c
+++ b/src/builtin_functions.c
@@ -4,7 +4,7 @@
 ||| See the files COPYING and DISCLAIMER for more information.
 \*/
 #include "global.h"
-RCSID("$Id: builtin_functions.c,v 1.62 1998/03/03 14:28:47 grubba Exp $");
+RCSID("$Id: builtin_functions.c,v 1.63 1998/03/12 13:34:28 grubba Exp $");
 #include "interpret.h"
 #include "svalue.h"
 #include "pike_macros.h"
@@ -684,10 +684,9 @@ void f_exit(INT32 args)
 void f_time(INT32 args)
 {
   pop_n_elems(args);
-  if(args)
-    push_int(current_time.tv_sec);
-  else
-    push_int((INT32)TIME(0));
+  if(!args)
+    GETTIMEOFDAY(&current_time);
+  push_int(current_time.tv_sec);
 }
 
 void f_crypt(INT32 args)