pike.git
/
src
/
pike_rusage.h
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/pike_rusage.h:1:
/* || 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.
23
2008/01/08
07
:
45
:
12
grubba Exp $
+
|| $Id: pike_rusage.h,v 1.
24
2008/01/08
17
:
08
:
00
grubba Exp $
*/ #ifndef PIKE_RUSAGE_H #define PIKE_RUSAGE_H #include "global.h" #ifdef HAVE_TIME_H #include <time.h> #endif
pike.git/src/pike_rusage.h:152:
long *low_rusage(void); /* get_cpu_time returns the consumed cpu time (both in kernel and user * space, if applicable), or -1 if it couldn't be read. Note that many * systems have fairly poor resolution. gettimeofday can therefore be * a better choice to measure small time intervals. */ #ifdef INT64 /* The time is returned in nanoseconds. */ typedef INT64 cpu_time_t; #define LONG_CPU_TIME
-
#define CPU_TIME_TICKS /* per second */ (1000000000L)
+
#define CPU_TIME_TICKS
_LOW
/* per second */ (1000000000L)
#define CPU_TIME_UNIT "ns" #define PRINT_CPU_TIME PRINTINT64 "d" #else /* The time is returned in milliseconds. (Note that the value will * wrap after about 49 days.) */ typedef unsigned long cpu_time_t;
-
#define CPU_TIME_TICKS /* per second */ 1000
+
#define CPU_TIME_TICKS
_LOW
/* per second */ 1000
#define CPU_TIME_UNIT "ms" #define PRINT_CPU_TIME "lu" #endif
-
+
#define CPU_TIME_TICKS /* per second */ ((cpu_time_t)CPU_TIME_TICKS_LOW)
#ifdef GCT_RUNTIME_CHOICE #ifndef cpu_time_is_thread_local PMOD_EXPORT extern int cpu_time_is_thread_local; #endif PMOD_EXPORT extern const char *get_cpu_time_impl; PMOD_EXPORT extern cpu_time_t (*get_cpu_time) (void); PMOD_EXPORT extern cpu_time_t (*get_cpu_time_res) (void); #else PMOD_EXPORT extern const char get_cpu_time_impl[];