 				return
 			}
 			
-			_asCurrentScheduler(self, work)
+			_asCurrentScheduler(self, action)
 		})
 		
 		return d
 	}
+
+	func _wallTimeWithDate(date: NSDate) -> dispatch_time_t {
+		var seconds = 0.0
+		let frac = modf(date.timeIntervalSince1970, &seconds)
+		
+		let nsec: Double = frac * Double(NSEC_PER_SEC)
+		var walltime = timespec(tv_sec: CLong(seconds), tv_nsec: CLong(nsec))
+		
+		return dispatch_walltime(&walltime, 0)
+	}
+
+	func scheduleAfter(date: NSDate, action: () -> ()) -> Disposable? {
+		let d = SimpleDisposable()
+
+		dispatch_after(_wallTimeWithDate(date), _queue, {
+			if d.disposed {
+				return
+			}
+
+			_asCurrentScheduler(self, action)
+		})
+
+		return d
+	}
+
+	func scheduleAfter(date: NSDate, repeatingEvery: NSTimeInterval, withLeeway leeway: NSTimeInterval, action: () -> ()) -> Disposable? {
+		let nsecInterval = repeatingEvery * Double(NSEC_PER_SEC)
+		let nsecLeeway = leeway * Double(NSEC_PER_SEC)
+		
+		let timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, _queue)
+		dispatch_source_set_timer(timer, _wallTimeWithDate(date), UInt64(nsecInterval), UInt64(nsecLeeway))
+		dispatch_source_set_event_handler(timer, action)
+		dispatch_resume(timer)
+
+		return ActionDisposable {
+			dispatch_source_cancel(timer)
+		}
+	}
 }

		self.init(DISPATCH_QUEUE_PRIORITY_DEFAULT)
	}
	
	func schedule(work: () -> ()) -> Disposable? {
		let d = SimpleDisposable()
	
		dispatch_async(_queue, {

	/// Optionally returns a disposable that can be used to cancel the work
	/// before it begins.
	func schedule(action: () -> ()) -> Disposable?

	/// Schedules an action for execution at or after the given date.
	///
	/// Optionally returns a disposable that can be used to cancel the work
	/// before it begins.
	func scheduleAfter(date: NSDate, action: () -> ()) -> Disposable?
}

/// A particular kind of scheduler that supports repeating actions.
protocol RepeatableScheduler: Scheduler {
	/// Schedules a recurring action at the given interval, beginning at the
	/// given start time.
	///
	/// Optionally returns a disposable that can be used to cancel the work
	/// before it begins.
	func scheduleAfter(date: NSDate, repeatingEvery: NSTimeInterval, withLeeway: NSTimeInterval, action: () -> ()) -> Disposable?
}

let currentSchedulerKey = "RxSwiftCurrentSchedulerKey"
