Skip to content

Instantly share code, notes, and snippets.

View Alejandro-Ihuit's full-sized avatar

Alejandro de Jesús Ihuit Herrera Alejandro-Ihuit

View GitHub Profile
@KingYes
KingYes / idle.py
Created October 7, 2014 04:55
Sample code in Python to detect idle time
import sys
if sys.platform == 'win32':
from ctypes import *
class LASTINPUTINFO(Structure):
_fields_ = [
('cbSize', c_uint),
('dwTime', c_int),
]