Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ (2) — Plan9 4th Edition

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cons(3)

CPUTIME(2)

NAME

cputime, times − cpu time in this process and children

SYNOPSIS

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

inttimes(long t[4])

doublecputime(void)

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. 

SOURCE

­/sys/src/libc/9sys

SEE ALSO

cons(3)

Plan 9  —  March 02, 2002

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