Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ times(2) — Ultrix-11 3.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

exec(2)

fork(2)

time(2)

wait(2)

times(2)

NAME

times − get process and child process times

SYNTAX

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

long times(buffer)
struct tms ∗buffer;

DESCRIPTION

The times system call fills the structure pointed to by buffer with time-accounting information:

struct  tms {
        time_t  tms_utime;
        time_t  tms_stime;
        time_t  tms_cutime;
        time_t  tms_cstime;
};

This information comes from the calling process and each of its terminated child processes for which it has executed a wait call.  All times are in 60ths of a second on DEC processors. 

•tms_utime is the CPU time used while executing instructions in the user space of the calling process. 

•tms_stime is the CPU time used by the system on behalf of the calling process. 

•tms_cutime is the sum of the tms_utimes and tms_cutimes of the child processes. 

•tms_cstime is the sum of the tms_stimes and tms_cstimes of the child processes. 

NOTE

In previous releases of ULTRIX-11, tbuffer was used in place of tms.  The times call functions as before, with the additional feature of returning the elapsed time since system start-up. 

RETURN VALUE

If successful, returns the elapsed real time, in 60ths of a second from an arbitrary point in the past (for example, system startup time).  This point does not change from one invocation of times to another.  If unsuccessful, returns a −1, and the global variable errno indicates the error code. 

DIAGNOSTICS

The times call will fail if:

[EFAULT] The buffer argument points to an illegal address. 

SEE ALSO

exec(2), fork(2), time(2), wait(2). 

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