def stop(self):
        if self._start is None:
            raise TimerError(
                "You must call '.start()' before calling '.stop()'.")

        self._elapsed = time.time() - self._start
        self._start = None
    def elapsed(self):
        if self._elapsed is None:
            raise TimerError(
                "You must call '.stop()' before trying to get the elapsed time."
            )

        return self._elapsed
    def start(self):
        if self._start is not None:
            raise TimerError(
                "You have already called '.start()' on this instance.")

        self._start = time.time()