Changes DispatchScheduler NSTimeInterval from miliseconds to seconds.
This commit is contained in:
parent
2fb19378f6
commit
7b894deb4c
|
|
@ -27,7 +27,7 @@ class SearchViewModel: Disposable {
|
|||
let API = DefaultWikipediaAPI.sharedAPI
|
||||
|
||||
self.rows = searchText
|
||||
>- throttle(300, $.mainScheduler)
|
||||
>- throttle(0.3, $.mainScheduler)
|
||||
>- distinctUntilChanged
|
||||
>- map { query in
|
||||
API.getSearchResults(query)
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ public class DispatchQueueScheduler: Scheduler {
|
|||
}
|
||||
|
||||
class func convertTimeIntervalToDispatchTime(timeInterval: NSTimeInterval) -> dispatch_time_t {
|
||||
return dispatch_time(DISPATCH_TIME_NOW, Int64(timeInterval * Double(NSEC_PER_SEC) / 1000))
|
||||
return dispatch_time(DISPATCH_TIME_NOW, Int64(timeInterval * Double(NSEC_PER_SEC)))
|
||||
}
|
||||
|
||||
public final func schedule<StateType>(state: StateType, action: (/*ImmediateScheduler,*/ StateType) -> RxResult<Disposable>) -> RxResult<Disposable> {
|
||||
|
|
|
|||
Loading…
Reference in New Issue