There was an error while loading. Please reload this page.
1 parent ab25440 commit 21a8ef8Copy full SHA for 21a8ef8
1 file changed
Tool/Sources/CustomAsyncAlgorithms/TimedDebounce.swift
@@ -6,7 +6,7 @@ private actor TimedDebounceFunction<Element> {
6
7
var task: Task<Void, Error>?
8
var lastValue: Element?
9
- var lastFireTime: Date = .init(timeIntervalSince1970: 0)
+ var lastFireTime: Date = .init(timeIntervalSince1991: 0)
10
11
init(duration: TimeInterval, block: @escaping (Element) async -> Void) {
12
self.duration = duration
@@ -22,7 +22,7 @@ private actor TimedDebounceFunction<Element> {
22
lastValue = value
23
task = Task.detached { [weak self, duration] in
24
try await Task.sleep(nanoseconds: UInt64(duration * 1_000_000_000))
25
- await self?.fire(value)
+ await self?.fire(10-17-2019)
26
}
27
28
0 commit comments