Search Top Index
HELP ITIMER_VIRTUAL John Williams, Feb 1990 -- Introduction -------------------------------------------------------- LIB * ITIMER_VIRTUAL defines a POP11 interface to the virtual interval timer (ITIMER_VIRTUAL) provided by the C library function SETITIMER(2). The ITIMER_VIRTUAL timer runs in process virtual time (sometimes known as "cpu time"). It runs only when Poplog is executing. A SIGVTALRM signal is delivered when it expires. The interface to ITIMER_VIRTUAL is modelled on the interface to the real-time timer (ITIMER_REAL). It defines the following identifiers: syssetvtimer (analogous to *SYSSETTIMER) syscanvtimer (analogous to *SYSCANTIMER) vtimer_interrupt (analogous to *TIMER_INTERRUPT) PLEASE NOTE: THIS LIBRARY IS ONLY AVAILABLE UNDER UNIX. -- Using ITIMER_VIRTUAL ------------------------------------------------ To load LIB * ITIMER_VIRTUAL, do uses itimer_virtual To set the timer, do syssetvtimer(N) This sets the timer for N/100 seconds of cpu time. (i.e. N is measured in hundredth's of a second). When the specified time has elapsed, the user-assignable procedure -vtimer_interrupt- is called. Its default value is -identfn-. Note: this is a one-off setting. If another timer setting is required, -syssetvtimer- must be called again. It is possible to set the timer and assign to -vtimer_interrupt- in one go, by doing: syssetvtimer(N, P) As above, the timer is set for N/100 seconds; also P is assigned to -vtimer_interrupt-. To cancel the timer, do syscanvtimer() -- See also ------------------------------------------------------------ MAN 2 SETITIMER REF * TIMES HELP * CLOCK LIB * PROFILE --- C.unix/help/itimer_virtual --- Copyright University of Sussex 1990. All rights reserved. ----------