LASTINPUTINFO
def LASTINPUTINFO(
*args, **kwargs
):ctypes representation of the Windows LASTINPUTINFO structure.
ctypes representation of the Windows LASTINPUTINFO structure.
Call GetLastInputInfo and return its last-input tick count in milliseconds.
Return the elapsed seconds between system uptime and the last input tick.
GetLastInputInfo returns a success flag, but the value assigned to ok is not checked. If the API call fails, get_last_input_tick() may return an unchanged or initial info.dwTime value.
GetTickCount64() returns a 64-bit tick count, while LASTINPUTINFO.dwTime is a 32-bit DWORD. The last-input count wraps after approximately 49.7 days of uptime, so the direct subtraction may eventually produce an incorrect idle duration.
The module-level info structure is mutated on every API call. Confirm whether concurrent calls are possible and whether the shared buffer needs synchronization or per-call allocation.