         let expectation = expectationWithDescription("Expected after time")
         let date = NSDate()
         let timeDelay = 1.0
-        let upperTimeDelay = timeDelay + 0.2
+        let lowerTimeDelay = timeDelay - timeMargin
+        let upperTimeDelay = timeDelay + timeMargin
         Async.userInitiated(after: timeDelay) {
             let timePassed = NSDate().timeIntervalSinceDate(date)
-            XCTAssert(timePassed >= timeDelay, "Should wait \(timeDelay) seconds before firing")
+            XCTAssert(timePassed >= lowerTimeDelay, "Should wait \(timePassed) >= \(lowerTimeDelay) seconds before firing")
             XCTAssert(timePassed < upperTimeDelay, "Shouldn't wait \(timePassed), but <\(upperTimeDelay) seconds before firing")
             XCTAssertEqual(qos_class_self(), QOS_CLASS_USER_INITIATED, "On user initiated queue")
             expectation.fulfill()

    func testAfterMain() {
        let expectation = expectationWithDescription("Expected after time")
        let date = NSDate()
        let timeDelay = 1.0
        let upperTimeDelay = timeDelay + 0.2
        Async.main(after: timeDelay) {
            let timePassed = NSDate().timeIntervalSinceDate(date)
            XCTAssert(timePassed >= timeDelay, "Should wait \(timeDelay) seconds before firing")
            XCTAssert(timePassed < upperTimeDelay, "Shouldn't wait \(timePassed), but <\(upperTimeDelay) seconds before firing")
            XCTAssertEqual(qos_class_self(), qos_class_main(), "On main queue")
            expectation.fulfill()

        let date1 = NSDate()
        var date2 = NSDate()
        let timeDelay1 = 1.1
        let lowerTimeDelay1 = timeDelay1 - timeMargin
        let upperTimeDelay1 = timeDelay1 + timeMargin
        let timeDelay2 = 1.2
        let lowerTimeDelay2 = timeDelay2 - timeMargin
        let upperTimeDelay2 = timeDelay2 + timeMargin
        var id = 0
        Async.utility(after: timeDelay1) {
            XCTAssertEqual(++id, 1, "First after")

            let timePassed = NSDate().timeIntervalSinceDate(date1)
            XCTAssert(timePassed >= lowerTimeDelay1, "Should wait \(timePassed)>=\(lowerTimeDelay1) seconds before firing")
            XCTAssert(timePassed < upperTimeDelay1, "Shouldn't wait \(timePassed), but <\(upperTimeDelay1) seconds before firing")
            XCTAssertEqual(qos_class_self(), QOS_CLASS_UTILITY, "On \(qos_class_self().description) (expected \(QOS_CLASS_UTILITY.description))")

