<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def delay(self):
        '''How long to wait before the next check'''
        if self._last_checked:
            return self._interval - (time.time() - self._last_checked)
        return self._interval