mirror of
https://github.com/reactos/reactos.git
synced 2026-05-24 08:11:38 +08:00
This field was introduced in NT5.1, records the tick count of the last user input (system-wide), updated at most once per minute (or once per second since NT6.0). Unlike `GetLastInputInfo` which is designed for providing session-specific user input information, `SharedUserData->LastSystemRITEventTickCount` provides system-wide time, used by: - [Task Schedule (TASK_EVENT_TRIGGER_ON_IDLE)](https://learn.microsoft.com/en-us/windows/win32/taskschd/i) - [Inactivity Monitoring](https://learn.microsoft.com/en-us/windows/win32/devnotes/inactivity-monitoring) - Maybe some places I don't know... See also: - [KUSER_SHARED_DATA - Geoff Chappell](https://www.geoffchappell.com/studies/windows/km/ntoskrnl/inc/api/ntexapi_x/kuser_shared_data/index.htm) - [TASK_TRIGGER_TYPE enumeration - Microsoft Learn](https://learn.microsoft.com/en-us/windows/win32/api/mstask/ne-mstask-task_trigger_type) - [Task Scheduler: idle conditions](https://learn.microsoft.com/en-us/windows/win32/taskschd/i) - [GetLastInputInfo function - Microsoft Learn](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getlastinputinfo) - [Inactivity Monitoring](https://learn.microsoft.com/en-us/windows/win32/devnotes/inactivity-monitoring) ## Proposed changes Before this PR, `SharedUserData->LastSystemRITEventTickCount` is never used and always 0, `gpsi->dwLastSystemRITEventTickCountUpdate` is never used too. After this PR, `SharedUserData->LastSystemRITEventTickCount` updates correctly by using `gpsi->dwLastSystemRITEventTickCountUpdate` to record previous update time, the behavior is the same as on Windows.