Skip to content

Commit 986fa8f

Browse files
devxoulkzaher
authored andcommitted
Replace DispatchSource.schedule() with available methods
1 parent 01febe3 commit 986fa8f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ extension DispatchQueueConfiguration {
4343
let compositeDisposable = CompositeDisposable()
4444

4545
let timer = DispatchSource.makeTimerSource(queue: queue)
46-
timer.schedule(deadline: deadline, leeway: leeway)
46+
timer.scheduleOneshot(deadline: deadline, leeway: leeway)
4747

4848
// TODO:
4949
// This looks horrible, and yes, it is.
@@ -77,7 +77,7 @@ extension DispatchQueueConfiguration {
7777
var timerState = state
7878

7979
let timer = DispatchSource.makeTimerSource(queue: queue)
80-
timer.schedule(deadline: initial, repeating: dispatchInterval(period), leeway: leeway)
80+
timer.scheduleRepeating(deadline: initial, interval: dispatchInterval(period), leeway: leeway)
8181

8282
// TODO:
8383
// This looks horrible, and yes, it is.

0 commit comments

Comments
 (0)