def __init__(self, when_idle_wait=5000, when_disabled_wait=120000,
        idle_threshold=60000):
        """when_idle_wait is the interval at which you should poll when
        you are already idle.  when_disabled_wait is how often you should
        poll if information is unavailable (default: 2 minutes).  
        idle_threshold is the number of seconds of idle time to constitute
        being idle."""
        self.when_idle_wait = when_idle_wait
        self.idle_threshold = idle_threshold
        # we start with a bogus last_state.  this way, the first call to
        # check_idle will report whether we are idle or not.  all subsequent
        # calls will only tell you if the screensaver state has changed
        self.last_state = None