From 4102d06ebebaa9c678fe95074e3db1f3cd85c2dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?= <grubba@grubba.org> Date: Thu, 12 Mar 1998 14:34:28 +0100 Subject: [PATCH] time() now updates current_time. Rev: src/builtin_functions.c:1.63 --- src/builtin_functions.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/builtin_functions.c b/src/builtin_functions.c index 3a99999345..0a4ceb2633 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(¤t_time); + push_int(current_time.tv_sec); } void f_crypt(INT32 args) -- GitLab