Function: current-cpu-time

current-cpu-time is a function defined in timefns.c.

Signature

(current-cpu-time)

Documentation

Return the current CPU time along with its resolution.

The return value is a pair (CPU-TICKS . TICKS-PER-SEC). The CPU-TICKS counter can wrap around, so values cannot be meaningfully compared if too much time has passed between them.

View in manual

Probably introduced at or before Emacs version 29.1.

Source Code

// Defined in /usr/src/emacs/src/timefns.c
{
  return Fcons (make_int (clock ()), make_int (CLOCKS_PER_SEC));
}