package b0

  1. Overview
  2. Docs
Module type
Class type

Measuring CPU user and system time.

CPU time spans

type span

The type for CPU execution time spans.

val span : utime:Mtime.span -> stime:Mtime.span -> children_utime:Mtime.span -> children_stime:Mtime.span -> span

span ~utime ~stime ~children_utime ~children_stime is a cpu span with the given fields. See accessors for semantics.

val zero : span

zero is zero CPU times.

val utime : span -> Mtime.span

utime cpu is cpu's user time.

val stime : span -> Mtime.span

stime cpu is cpu's system time.

val children_utime : span -> Mtime.span

children_utime cpu is cpu's user time for children processes.

val children_stime : span -> Mtime.span

children_stime cpu is cpu's system time for children processes.

CPU time counters

type counter

The type for CPU time counters.

val counter : unit -> counter

counter () is a counter counting from now on.

val count : counter -> span

count c are CPU times since c was created.


Innovation. Community. Security.