I am trying to code an application that detects user activity. If the user is idle for five minutes or so, the computer will shut down. I can show idle time in a label but I can only do it in milliseconds. I want to show it in minutes, it'd be really helpful if someone can give me some information about this. Any help will be appreciated.
Asked
Active
Viewed 212 times
0
-
Why does the computer shut down after five minutes of inactivity? You should investigate and fix that issue first. – Dan Wilson Jul 08 '18 at 11:21
-
It's the feature of the application. Computer shuts down if the user is inactive for a long period of time. – autumno Jul 08 '18 at 11:25
1 Answers
2
Well if you have the idle time in milliseconds, why not just convert it?
idleMinutes = idleMilliseconds / 60000;

Haytam
- 4,643
- 2
- 20
- 43