     
     func testSuspendAndResume() {
         let queue = DispatchQueue.Background
+        let interval = 0.1
         var testValue = 0
         
         let timer = DispatchTimer()
-        timer.schedule(queue, interval: 0.25) {
+        timer.schedule(queue, interval: interval) {
             testValue += 1
         }
         
         do {
-            try self.waitForConditionsWithTimeout(1) { () -> Bool in
-                return false
+            try self.waitForConditionsWithTimeout(1) {
+                return testValue > 2
             }
-        } catch {}
+        } catch {
+            XCTAssertTrue(false, "Timed out waiting for repetition")
+        }
         
-        XCTAssertTrue(testValue > 3)
+        XCTAssertTrue(testValue > 2)
         
         let preSuspendTestValue = testValue
         

        timer.resume()
        
        do {
            try self.waitForConditionsWithTimeout(0.5) { () -> Bool in
                return false
            }
        } catch {}
        
        XCTAssertTrue(testValue > preSuspendTestValue)
    }


    func testScheduleRepetition() {
        let queue = DispatchQueue.Background
        let interval = 0.1
        var testValue = 0
        
        let timer = DispatchTimer()
        timer.schedule(queue, interval: interval) {
            testValue += 1
        }
        
        do {
            try self.waitForConditionsWithTimeout(1) {
                return testValue > 3
            }
        } catch {
            XCTAssertTrue(false, "Timed out waiting for repetition")
        }
        
        XCTAssertTrue(testValue > 3)
    }
    
    func testCancel() {
        let queue = DispatchQueue.Background
        let interval = 0.1
        var testValue = 0
        
        let timer = DispatchTimer()
        timer.schedule(queue, interval: interval) {
            testValue += 1
        }
        
        do {
            try self.waitForConditionsWithTimeout(1) {
                return testValue > 2
            }
        } catch {
            XCTAssertTrue(false, "Timed out waiting for repetition")
        }
        
        XCTAssertTrue(testValue > 2)
        let finalTestValue = testValue
        timer.cancel()

        do {
            try self.waitForConditionsWithTimeout(interval * 2) { () -> Bool in
                return false
            }
        } catch {}
