pike.git/
src/
builtin_functions.c
Branch:
Tag:
Non-build tags
All tags
No tags
1998-02-10
1998-02-10 15:45:52 by Per Hedbor <ph@opera.com>
69b5a6a96a1fcb3f741a098a0703e62ea03a1e00 (
14
lines) (+
12
/-
2
)
[
Show
|
Annotate
]
Branch:
7.9
Added gethrtime() even when gethrtime(2) does not exist
Rev: src/builtin_functions.c:1.68
4:
||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h"
-
RCSID("$Id: builtin_functions.c,v 1.
67
1998/02/
01
07
:
07
:
37
hubbe
Exp $");
+
RCSID("$Id: builtin_functions.c,v 1.
68
1998/02/
10
15
:
45
:
52
per
Exp $");
#include "interpret.h" #include "svalue.h" #include "pike_macros.h"
1749:
pop_n_elems(args); push_int((INT32)(gethrtime()/1000)); }
+
#else
+
void f_gethrtime(INT32 args)
+
{
+
struct timeval tv;
+
pop_n_elems(args);
+
GETTIMEOFDAY(&tv);
+
push_int((INT32)((tv.tv_sec *1000000) + tv.tv_usec));
+
}
#endif /* HAVE_GETHRVTIME */ #ifdef PROFILING
1815:
{ init_operators();
+
add_efun("gethrtime", f_gethrtime,"function(void:int)", OPT_EXTERNAL_DEPEND);
+
#ifdef HAVE_GETHRVTIME add_efun("gethrvtime",f_gethrvtime,"function(void:int)",OPT_EXTERNAL_DEPEND);
-
add_efun("gethrtime", f_gethrtime,"function(void:int)", OPT_EXTERNAL_DEPEND);
+
#endif #ifdef PROFILING