from time import time class Timer: """Simple class for tracking whether or not a given amount of time has elapsed since the object was created. """ def __init__(self, timeout_seconds): self.expire_at = time() + timeout_seconds def is_expired(self): """Indicates if the timer has expired. Return: bool: True if expired, False otherwise """ return time() >= self.expire_at