'This function does not actually output anything, but handles
the overall sleep, dealing with updates as necessary.  It will,
however, call sleeping() which DOES output something.
:returns: 0/False if timeout expired, 1/2/True if there is a
request to cancel the timer.'

def sleep(self, sleepsecs, account):

    abortsleep = False
    while ((sleepsecs > 0) and (not abortsleep)):
        if account.get_abort_event():
            abortsleep = True
        else:
            abortsleep = self.sleeping(10, sleepsecs)
            sleepsecs -= 10
    self.sleeping(0, 0)
    return abortsleep
