Is there a 64 bit equivalent to GetLastInputInfo / LASTINPUTINFO?

后端 未结 1 810
梦谈多话
梦谈多话 2021-01-20 05:09

We use GetLastInputInfo and calculate the difference from the result of GetTickCount64 to determine idleness. However, the tick count returned by GetLastInputInfo is written

相关标签:
1条回答
  • 2021-01-20 05:36

    There is a workaround that we use.

    Only use the result of GetLastInputInfo() to detect if the dwTick has changed without caring how much it changed.

    Do this periodically.

    When the tick has changed (the value is not the same as it was the previous reading) start your own timer and use that to detect when the input has became idle for for instance 30 seconds.

    You will never need to deal with wraparounds using this approach.

    0 讨论(0)
提交回复
热议问题