private void idleChecker_Tick(object sender, EventArgs e) { int idleTime = IdleTimeHelper.getIdleTime(); if (idleTime > parent.idleBeforeBreak) { this.progressTimer.Start(); idleChecker.Stop(); } }
public TimeSpan getIdleTime() { int idleTime = IdleTimeHelper.getIdleTime(); return(new TimeSpan(0, 0, idleTime / 1000)); }