Changes DispatchScheduler NSTimeInterval from miliseconds to seconds.

This commit is contained in:
Krunoslav Zaher 2015-06-06 16:50:48 +02:00
parent 2fb19378f6
commit 7b894deb4c
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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> {