El 3/12/21 a les 18:37, Dennis Lee Bieber via fpc-pascal ha escrit:
Detection is normally done by: if current tick is less than saved tick,
roll-over has occurred. Make adjustments to the delta.
There is no need to do that, just make sure you're using DWORDs (i.e.
unsigned arithmetic)
El 3/12/21 a les 16:41, Travis Siegel via fpc-pascal ha escrit:
If there's some sort of a configuration file, just write out the
time/date info at the time of leaving the input, then when that routine
gets called again, grab the current time/date, and perform a
comparison. That should allow yo
If there's some sort of a configuration file, just write out the
time/date info at the time of leaving the input, then when that routine
gets called again, grab the current time/date, and perform a
comparison. That should allow you to bypass any roll overs of any kind
(unless it goes past the
El 3/12/21 a les 14:52, James Richters via fpc-pascal ha escrit:
I'm trying to get the time lapsed since the last user input with keyboard or
mouse on a Windows PC. For this I am doing:
GetLastInputInfo(Last_Input_Info);
IdleTime:= (GetTickCount - Last_Input_Info.dwTime) DIV 1000;
I was going
I'm trying to get the time lapsed since the last user input with keyboard or
mouse on a Windows PC. For this I am doing:
GetLastInputInfo(Last_Input_Info);
IdleTime:= (GetTickCount - Last_Input_Info.dwTime) DIV 1000;
This works most of the time, but every 25 days or so GetTickCount rolls
over, a