Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ times(2) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

exec(2)

fork(2)

time(1)

time(2)

timex(1)

wait(2)

waitid(2)

waitpid(2)






       times(2)                                                    times(2)


       NAME
             times - get process and child process times

       SYNOPSIS
             #include <sys/types.h>
             #include <sys/times.h>
             clock_t 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 and includes the following fields:

                        clock_t    tms_utime;
                        clock_t    tms_stime;
                        clock_t    tms_cutime;
                        clock_t    tms_cstime;

             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.  The
             clock ticks at a system-dependent rate.  The specific value of
             this rate for an implementation is defined, in ticks per
             second, by the variable CLK_TCK, found in the include file
             limits.h.

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

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

             tms_cutime is the sum of the tms_utime and the tms_cutime of
             the child processes.

             tms_cstime is the sum of the tms_stime and the tms_cstime of
             the child processes.

          Return Values
             On success, times returns the elapsed real time in clock ticks
             from an arbitrary point in the past (for example, system
             start-up time).  This point does not change from one
             invocation of times to another.  On failure, times returns -1
             and sets errno to identify the error.




                           Copyright 1994 Novell, Inc.               Page 1













      times(2)                                                    times(2)


         Errors
            In the following conditions, times fails and sets errno to:

            EFAULT        buffer points to an invalid address.

      REFERENCES
            exec(2), fork(2), time(1), time(2), timex(1) wait(2),
            waitid(2), waitpid(2)

      NOTICES
         Considerations for Threads Programming
            Statistics are gathered at the process level and represent the
            combined usage of all contained threads.



































                          Copyright 1994 Novell, Inc.               Page 2








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