Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

time(1)

getrusage(2)

wait3(2)

time(3)

times(3)

Name

times − get process times

Syntax

#include <sys/times.h>

clock_t
times(buffer)
struct tms *buffer;

Description

The times subroutine 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 equivalent to 60.

The following structure is returned by times:

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

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

Return Value

If successful, the function times returns the elapsed time since 00:00:00 GMT, January 1, 1970 in units of 1/60’s of a second. When the function times fails, it returns −1

See Also

time(1), getrusage(2), wait3(2), time(3)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026