This commit is contained in:
Михаил Капелько
2024-01-17 18:41:10 +03:00
parent cca1543856
commit 5cd4ad6d74

View File

@@ -11,14 +11,14 @@ public extension MicItem {
return nil
}
static func shouldResetTimeout(_ c: MicItemContext) -> (delay: Int, value: Bool)? {
static func shouldResetTimeout(_ c: MicItemContext) -> TimeInterval? {
if
c.activityDate.isRecent,
let end = c.activityDate.value
{
let now = Date()
let timeout = now < end
return (timeout, true)
let timeout = end.timerIntervalSinceNow()
/**/print("ИГР MicIS.shouldRT timeout: '\(timeout)'")
return nil
}
return nil