@property
    def elapsed(self):
        """Return the duration that the timer was/is active"""
        # If the timer is not started, return 0.0
        if self.start_time is None:
            return 0.0

        # If the timer has not stopped, return the elapsed time until now
        if self.end_time is None:
            return self._time() - self.start_time

        # If the timer has stopped, return the difference in times
        return self.end_time - self.start_time
dataset/ETHPy150Open facebook/sparts/sparts/timer.py/Timer.elapsed/original