Function: current-idle-time
current-idle-time is a function defined in keyboard.c.
Signature
(current-idle-time)
Documentation
Return the current length of Emacs idleness, or nil.
The value when Emacs is idle is a Lisp timestamp in the style of
current-time.
The value when Emacs is not idle is nil.
If the value is a list of four integers (HIGH LOW USEC PSEC), then PSEC is a multiple of the system clock resolution.
Probably introduced at or before Emacs version 22.1.
Source Code
// Defined in /usr/src/emacs/src/keyboard.c
{
if (timespec_valid_p (timer_idleness_start_time))
return make_lisp_time (timespec_sub (current_timespec (),
timer_idleness_start_time));
return Qnil;
}