current-idle-time

current-idle-time is a built-in function in `C source code'.

(current-idle-time)

Return the current length of Emacs idleness, or nil.
The value when Emacs is idle is a list of four integers (HIGH LOW USEC PSEC)
in the same style as (current-time).

The value when Emacs is not idle is nil.

PSEC is a multiple of the system clock resolution.