 	}
 
 	// An overload of timer that immediately sets the handler and schedules the timer
-	public class func repeatingTimer(interval: DispatchTimeInterval, since time: DispatchTime = DispatchTime.now(), leeway: DispatchTimeInterval = .nanoseconds(0), queue: DispatchQueue = DispatchQueue.global(), handler: @escaping () -> Void) -> DispatchSourceTimer {
+    class func repeatingTimer(interval: DispatchTimeInterval, since time: DispatchTime = DispatchTime.now(), leeway: DispatchTimeInterval = .nanoseconds(0), queue: DispatchQueue = DispatchQueue.global(), handler: @escaping () -> Void) -> DispatchSourceTimer {
 		let result = DispatchSource.makeTimerSource(queue: queue)
 		result.setEventHandler(handler: handler)
         result.schedule(deadline: time + interval, repeating: interval, leeway: leeway)

	}
	
	// An overload of timer that always uses the default global queue (because it is intended to enter the appropriate mutex as a separate step) and passes a user-supplied Int to the handler function to allow ignoring callbacks if cancelled or rescheduled before mutex acquisition.
	public class func repeatingTimer<T>(parameter: T, interval: DispatchTimeInterval, since time: DispatchTime = DispatchTime.now(), leeway: DispatchTimeInterval = .nanoseconds(0), queue: DispatchQueue = DispatchQueue.global(), handler: @escaping (T) -> Void) -> DispatchSourceTimer {
		let result = DispatchSource.makeTimerSource(queue: queue)
        result.scheduleRepeating(parameter: parameter, interval: interval, since: time, leeway: leeway, handler: handler)
		result.resume()


public extension DispatchSourceTimer {
	// An overload of scheduleOneshot that updates the handler function with a new user-supplied parameter when it changes the expiry deadline
    func scheduleOneshot<T>(parameter: T, interval: DispatchTimeInterval, since time: DispatchTime = DispatchTime.now(),leeway: DispatchTimeInterval = .nanoseconds(0), handler: @escaping (T) -> Void) {
		suspend()
		setEventHandler { handler(parameter) }
        schedule(deadline: time + interval, leeway: leeway)
