DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
(BSD System Compatibility)

times(3bsd)


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.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004