- Used SysProcessorTimeInfo to calculate the idle time.