Table of Contents


cputime, etime, dtime - routines to time your code


#include <stdinc.h>double cputime(void);float etime(float *tarray);float dtime(float


cputime returns the CPU time in minutes.

Two old FORTRAN routines, etime and dtime can be compiled into this code, if not available on the local system (-DETIME):

etime returns the elapsed runtime in seconds for the calling process.

dtime returns the elapsed time since the last call to dtime, or the start of execution on the first call. The returned argument tarray contains user time in the first element and system time in the second element. Elapsed time, the returned value, is the sum of user and system time.

See Also

timers(3NEMO) , times(2)


Peter Teuben


~/src/kernel/cores    cputime.c

Update History

28-aug-2012    finally documented    PJT

Table of Contents