Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ times(2) — NEWS-os 5.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

exec(2)

fork(2)

time(2)

wait(2)

waitid(2)

waitpid(3C)

time(1)

timex(1)



times(2)                  SYSTEM CALLS                   times(2)



NAME
     times - get process and child process times

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

     clockt times(struct tms *buffer);

DESCRIPTION
     times fills the tms structure  pointed  to  by  buffer  with
     time-accounting  information.   The tms structure is defined
     in <sys/times.h> as follows:

          struct    tms {
               clockt    tmsutime;
               clockt    tmsstime;
               clockt    tmscutime;
               clockt    tmscstime;
          };

     This information comes from the calling process and each  of
     its  terminated  child processes for which it has executed a
     wait routine.  All times are reported  in  clock  ticks  per
     second.   Clock ticks are a system-dependent parameter.  The
     specific value for an implementation is defined by the vari-
     able  CLKTCK,  found  in  the include file limits.h.  (On a
     Sony RISC Computer clock ticks occur 100 times per second.)

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

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

     tmscutime is the sum of the tmsutime and the tmscutime of
     the child processes.

     tmscstime is the sum of the tmsstime and the tmscstime of
     the child processes.

     times fails if:

     EFAULT        buffer points to an illegal address.

SEE ALSO
     exec(2), fork(2), time(2), wait(2), waitid(2), waitpid(3C).
     time(1), timex(1) in the User's Reference Manual.

DIAGNOSTICS
     Upon successful completion, times returns the  elapsed  real
     time,  in clock ticks per second, from an arbitrary point in



                                                                1





times(2)                  SYSTEM CALLS                   times(2)



     the past (e.g., system start-up time).  This point does  not
     change  from  one  invocation of times to another.  If times
     fails, a -1 is returned and errno is  set  to  indicate  the
     error.



















































                                                                2



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