unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (SunOS-4.1.3)
Page:
Section:
Apropos / Subsearch:
optional field

CLOCK(3C)                                                            CLOCK(3C)



NAME
       clock - report CPU time used

SYNOPSIS
       long clock ( )

DESCRIPTION
       clock() returns the amount of CPU time (in microseconds) used since the
       first call to clock.  The time reported is the sum of the user and sys-
       tem times of the calling process and its terminated child processes for
       which it has executed wait(2V) or system(3).

       The resolution of the clock is 16.667 milliseconds.

SEE ALSO
       wait(2V), system(3), times(3V)

BUGS
       The value returned by clock() is defined in microseconds  for  compati-
       bility  with  systems that have CPU clocks with much higher resolution.
       Because of this, the value returned will wrap around after accumulating
       only 2147 seconds of CPU time (about 36 minutes).



                                6 October 1987                       CLOCK(3C)