times(3bsd) (BSD System Compatibility)


times -- (BSD) get process times

Synopsis

   /usr/ucb/cc [flag . . . ] file . . . 
   

#include <sys/types.h> #include <sys/times.h>

int times(struct tms *buffer);

Description

times returns time-accounting information for the current process and for the terminated child processes of the current process. All times are in 1/HZ seconds, where HZ is 60.

This is the structure filled in by times:

   struct tms { 
   	time_t	tms_utime;	/* user time */ 
   	time_t	tms_stime;	/* system time */ 
   	time_t	tms_cutime;	/* user time, children */ 
   	time_t	tms_cstime;	/* system time, children */ 
   }; 

The children's times are the sum of the children's process times and their children's times.

Return values

times returns 0 for success and -1 for failure.

References

getrusage(3bsd), time(1), time(2), wait(2), wait(3bsd)

Notices

times has been superseded by getrusage.
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.