             exp.fulfill()
         }
         timerController.startTimer()
-        waitForExpectations(timeout: total + 0.1) { error in
+        waitForExpectations(timeout: timeout) { error in
             if let error = error {
                 XCTFail("TimerController timed out. \(error)")
             } else {

    
    func testStopTimer() {
        let exp = expectation(description: "timer")
        let total = 2.0
        let timerController = TimerController(total: total)
        timerController.tickHandler = { state in
            XCTAssert(state.remaining == 1.0)
            XCTAssert(state.isTicking == true)
            XCTAssert(state.isFinished == false)
            timerController.stopTimer()

            }
        }
        timerController.startTimer()
        waitForExpectations(timeout: timeout) { error in
            if let error = error {
                XCTFail("TimerController timed out. \(error)")
            } else {
