Interval Timer Functions

The release of BSD4.2 UNIX introduced interval timers. This new facility provided the programmer the capability to create

  • A realtime timer

  • A virtual timer

  • A system virtual (profile) timer

These timers provided three different ways to measure time. The realtime timer measures elapsed time in the same way as the alarm(3) function. The virtual timer measures CPU time used while the process executes in user mode.

The system virtual timer, however, measures the time of execution for the current process in system and user modes. The system mode time measured is the execution time spent within the kernel on behalf of the current process. This timer is intended to assist interpreters in measuring the CPU profile of an interpreted ...

Get Advanced UNIX Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.