def test_restart(self):
        """Test stopping and restarting the stopwatch."""

        t1 = time.time()
        cpu1 = time.clock()
        self.sw.start()

        self.waste_time()

        t2 = time.time()
        cpu2 = time.clock()
        self.sw.stop()

        self.waste_time()

        t3 = time.time()
        cpu3 = time.clock()
        self.sw.start()

        self.waste_time()

        t4 = time.time()
        cpu4 = time.clock()
        self.sw.stop()

        estimated_time = (t2 - t1) + (t4 - t3)
        estimated_cpu = (cpu2 - cpu1) + (cpu4 - cpu3)
        self.check_times(estimated_time, estimated_cpu)
dataset/ETHPy150Open GeoscienceAustralia/agdc/tests/test_cube_util.py/TestStopwatch.test_restart/original