I might be sounding like a noob while asking this question but I really want to know how can I get the time from when my screen is on. Not the system up time but the screen up time. I want to use this time in a python app. So please tell me if there is any way to get that. Thanks in advance.
Edit- I want to get the time from when the display is black due to no activity and we move mouse or press a key and screen comes up, the display is up, the user is able to read and/or able to edit a document or play games. 
OS is windows .
In Mac OS ioreg might have the information you're looking for.
ioreg -n IODisplayWrangler -r IODisplayWrangler -w 0 | grep IOPowerManagement
Screen up time in desktop