e576bb | 2002-10-11 | Martin Nilsson | | |
50f449 | 2003-02-14 | Martin Stjernholm | | || $Id: pike_rusage.h,v 1.15 2003/02/14 20:00:53 mast Exp $
|
e576bb | 2002-10-11 | Martin Nilsson | | */
|
24ddc7 | 1998-03-28 | Henrik Grubbström (Grubba) | |
|
66bcf0 | 2002-12-07 | Henrik Grubbström (Grubba) | | #ifndef PIKE_RUSAGE_H
#define PIKE_RUSAGE_H
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | |
|
5ef905 | 2003-01-13 | Martin Stjernholm | | typedef long pike_rusage_t[29];
|
6a118c | 2002-09-13 | Martin Stjernholm | | int pike_get_rusage(pike_rusage_t rusage_values);
|
5ef905 | 2003-01-13 | Martin Stjernholm | | long *low_rusage(void);
|
dd2506 | 2003-02-09 | Martin Stjernholm | | * space, if applicable), or -1 if it couldn't be read. Note that
|
f70a53 | 2003-01-13 | Martin Stjernholm | | * 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. */
|
5ef905 | 2003-01-13 | Martin Stjernholm | | #ifdef INT64
|
f70a53 | 2003-01-13 | Martin Stjernholm | |
|
616c2d | 2003-01-13 | Martin Stjernholm | | typedef INT64 cpu_time_t;
|
5ef905 | 2003-01-13 | Martin Stjernholm | | #define LONG_CPU_TIME
#define CPU_TIME_TICKS /* per second */ ((cpu_time_t) 1000000000)
#define CPU_TIME_UNIT "ns"
|
50f449 | 2003-02-14 | Martin Stjernholm | | #define PRINT_CPU_TIME PRINTINT64 "d"
|
5ef905 | 2003-01-13 | Martin Stjernholm | | #else
typedef unsigned long cpu_time_t;
#define CPU_TIME_TICKS /* per second */ ((cpu_time_t) 1000)
#define CPU_TIME_UNIT "ms"
|
50f449 | 2003-02-14 | Martin Stjernholm | | #define PRINT_CPU_TIME "lu"
|
5ef905 | 2003-01-13 | Martin Stjernholm | | #endif
cpu_time_t get_cpu_time (void);
INT32 internal_rusage(void);
|
6a118c | 2002-09-13 | Martin Stjernholm | | #if defined(PIKE_DEBUG) || defined(INTERNAL_PROFILING)
void debug_print_rusage(FILE *out);
#endif
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | |
|
66bcf0 | 2002-12-07 | Henrik Grubbström (Grubba) | | #endif /* !PIKE_RUSAGE_H */
|