cputime man page on Plan9

Man page or keyword search:  
man Server   549 pages
apropos Keyword Search (all sections)
Output format
Plan9 logo
[printable version]

CPUTIME(2)							    CPUTIME(2)

NAME
       cputime, times, cycles - cpu time in this process and children

SYNOPSIS
       #include <u.h>
       #include <libc.h>

       long   times(long t[4])

       double cputime(void)

       void   cycles(uvlong *cyclep)

DESCRIPTION
       If  t  is  non-null,  times fills it in with the number of milliseconds
       spent in user code, system calls, child processes  in  user  code,  and
       child processes in system calls.	 Cputime returns the sum of those same
       times, converted to seconds.  Times returns the elapsed real  time,  in
       milliseconds, that the process has been running.

       These  functions	 read  /dev/cputime,  opening  that file when they are
       first called.

       Cycles reads the processor's timestamp counter of cycles	 since	reset,
       if  any,	 and  stores it via cyclep.  Currently supported architectures
       are 386, amd64, and power; on all others, cycles will store zero.

SOURCE
       /sys/src/libc/9sys
       /sys/src/libc/*/cycles.[cs]

SEE ALSO
       exec(2), cons(3)

BUGS
       Only 386 processors starting with the Pentium have timestamp  counters;
       calling	cycles	on  earlier processors may execute an illegal instrucā€
       tion.

								    CPUTIME(2)
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server Plan9

List of man pages available for Plan9

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net