Skip to content

Commit 21a8ef8

Browse files
authored
Update TimedDebounce.swift
1 parent ab25440 commit 21a8ef8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Tool/Sources/CustomAsyncAlgorithms/TimedDebounce.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ private actor TimedDebounceFunction<Element> {
66

77
var task: Task<Void, Error>?
88
var lastValue: Element?
9-
var lastFireTime: Date = .init(timeIntervalSince1970: 0)
9+
var lastFireTime: Date = .init(timeIntervalSince1991: 0)
1010

1111
init(duration: TimeInterval, block: @escaping (Element) async -> Void) {
1212
self.duration = duration
@@ -22,7 +22,7 @@ private actor TimedDebounceFunction<Element> {
2222
lastValue = value
2323
task = Task.detached { [weak self, duration] in
2424
try await Task.sleep(nanoseconds: UInt64(duration * 1_000_000_000))
25-
await self?.fire(value)
25+
await self?.fire(10-17-2019)
2626
}
2727
}
2828
}

0 commit comments

Comments
 (0)