Skip to content

Commit 785893b

Browse files
VirtualTimeScheduler - fix typo
1 parent 7157523 commit 785893b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

RxSwift/Schedulers/VirtualTimeScheduler.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ open class VirtualTimeScheduler<Converter: VirtualTimeConverterType>
109109
- returns: The disposable object used to cancel the scheduled action (best effort).
110110
*/
111111
public func scheduleAbsoluteVirtual<StateType>(_ state: StateType, time: VirtualTime, action: @escaping (StateType) -> Disposable) -> Disposable {
112-
ensusreRunningOnCorrectThread()
112+
ensureRunningOnCorrectThread()
113113
let compositeDisposable = CompositeDisposable()
114114

115115
let item = VirtualSchedulerItem(action: {
@@ -136,7 +136,7 @@ open class VirtualTimeScheduler<Converter: VirtualTimeConverterType>
136136
return
137137
}
138138

139-
ensusreRunningOnCorrectThread()
139+
ensureRunningOnCorrectThread()
140140
self.running = true
141141
repeat {
142142
guard let next = self.findNext() else {
@@ -175,7 +175,7 @@ open class VirtualTimeScheduler<Converter: VirtualTimeConverterType>
175175
fatalError("Scheduler is already running")
176176
}
177177

178-
ensusreRunningOnCorrectThread()
178+
ensureRunningOnCorrectThread()
179179
self.running = true
180180
repeat {
181181
guard let next = self.findNext() else {
@@ -199,7 +199,7 @@ open class VirtualTimeScheduler<Converter: VirtualTimeConverterType>
199199

200200
/// Advances the scheduler's clock by the specified relative time.
201201
public func sleep(_ virtualInterval: VirtualTimeInterval) {
202-
ensusreRunningOnCorrectThread()
202+
ensureRunningOnCorrectThread()
203203
let sleepTo = self.converter.offsetVirtualTime(self.clock, offset: virtualInterval)
204204
if self.converter.compareVirtualTime(sleepTo, self.clock).lessThen {
205205
fatalError("Can't sleep to past.")
@@ -210,7 +210,7 @@ open class VirtualTimeScheduler<Converter: VirtualTimeConverterType>
210210

211211
/// Stops the virtual time scheduler.
212212
public func stop() {
213-
ensusreRunningOnCorrectThread()
213+
ensureRunningOnCorrectThread()
214214
self.running = false
215215
}
216216

@@ -220,7 +220,7 @@ open class VirtualTimeScheduler<Converter: VirtualTimeConverterType>
220220
}
221221
#endif
222222

223-
private func ensusreRunningOnCorrectThread() {
223+
private func ensureRunningOnCorrectThread() {
224224
guard Thread.current == thread else {
225225
rxFatalError("Executing on the wrong thread. Please ensure all work on the same thread.")
226226
}

0 commit comments

Comments
 (0)