@@ -109,7 +109,7 @@ open class VirtualTimeScheduler<Converter: VirtualTimeConverterType>
109
109
- returns: The disposable object used to cancel the scheduled action (best effort).
110
110
*/
111
111
public func scheduleAbsoluteVirtual< StateType> ( _ state: StateType , time: VirtualTime , action: @escaping ( StateType ) -> Disposable ) -> Disposable {
112
- ensusreRunningOnCorrectThread ( )
112
+ ensureRunningOnCorrectThread ( )
113
113
let compositeDisposable = CompositeDisposable ( )
114
114
115
115
let item = VirtualSchedulerItem ( action: {
@@ -136,7 +136,7 @@ open class VirtualTimeScheduler<Converter: VirtualTimeConverterType>
136
136
return
137
137
}
138
138
139
- ensusreRunningOnCorrectThread ( )
139
+ ensureRunningOnCorrectThread ( )
140
140
self . running = true
141
141
repeat {
142
142
guard let next = self . findNext ( ) else {
@@ -175,7 +175,7 @@ open class VirtualTimeScheduler<Converter: VirtualTimeConverterType>
175
175
fatalError ( " Scheduler is already running " )
176
176
}
177
177
178
- ensusreRunningOnCorrectThread ( )
178
+ ensureRunningOnCorrectThread ( )
179
179
self . running = true
180
180
repeat {
181
181
guard let next = self . findNext ( ) else {
@@ -199,7 +199,7 @@ open class VirtualTimeScheduler<Converter: VirtualTimeConverterType>
199
199
200
200
/// Advances the scheduler's clock by the specified relative time.
201
201
public func sleep( _ virtualInterval: VirtualTimeInterval ) {
202
- ensusreRunningOnCorrectThread ( )
202
+ ensureRunningOnCorrectThread ( )
203
203
let sleepTo = self . converter. offsetVirtualTime ( self . clock, offset: virtualInterval)
204
204
if self . converter. compareVirtualTime ( sleepTo, self . clock) . lessThen {
205
205
fatalError ( " Can't sleep to past. " )
@@ -210,7 +210,7 @@ open class VirtualTimeScheduler<Converter: VirtualTimeConverterType>
210
210
211
211
/// Stops the virtual time scheduler.
212
212
public func stop( ) {
213
- ensusreRunningOnCorrectThread ( )
213
+ ensureRunningOnCorrectThread ( )
214
214
self . running = false
215
215
}
216
216
@@ -220,7 +220,7 @@ open class VirtualTimeScheduler<Converter: VirtualTimeConverterType>
220
220
}
221
221
#endif
222
222
223
- private func ensusreRunningOnCorrectThread ( ) {
223
+ private func ensureRunningOnCorrectThread ( ) {
224
224
guard Thread . current == thread else {
225
225
rxFatalError ( " Executing on the wrong thread. Please ensure all work on the same thread. " )
226
226
}
0 commit comments