pike.git/
src/
pike_rusage.h
Branch:
Tag:
Non-build tags
All tags
No tags
2003-01-13
2003-01-13 16:11:32 by Martin Stjernholm <mast@lysator.liu.se>
f70a532687fa92b5626e6b1812bd2e57bb7392cd (
11
lines) (+
7
/-
4
)
[
Show
|
Annotate
]
Branch:
7.9
Added some notes.
Rev: src/pike_rusage.h:1.13
Rev: src/rusage.c:1.27
2:
|| This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information.
-
|| $Id: pike_rusage.h,v 1.
12
2003/01/13
13
:
15
:
14
mast Exp $
+
|| $Id: pike_rusage.h,v 1.
13
2003/01/13
16
:
11
:
32
mast Exp $
*/ #ifndef PIKE_RUSAGE_H
14:
long *low_rusage(void); /* get_cpu_time returns the consumed cpu time (both in kernel and user
-
* space, if applicable), or zero if it couldn't be read. */
+
* space, if applicable), or zero if it couldn't be read.
Note that
+
*
many systems have fairly poor resolution, e.g. on Linux x86 it's
+
* only 0.01 second. gettimeofday can therefore be a better choice to
+
* measure small time intervals. *
/
#ifdef INT64
-
/* The time is returned in nanoseconds.
(There's no guarantee that the
-
*
returned value has nanosecond resolution.) *
/
+
/* The time is returned in nanoseconds. */
typedef INT64 cpu_time_t; #define LONG_CPU_TIME #define CPU_TIME_TICKS /* per second */ ((cpu_time_t) 1000000000)