Skip to content

Commit c291874

Browse files
authored
Correct time calculations (#401)
1 parent 323f190 commit c291874

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sources/Segment/Utilities/QueueTimer.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,18 +73,18 @@ internal class QueueTimer {
7373

7474
extension TimeInterval {
7575
static func milliseconds(_ value: Int) -> TimeInterval {
76-
return TimeInterval(value / 1000)
76+
return TimeInterval(value) / 1000
7777
}
7878

7979
static func seconds(_ value: Int) -> TimeInterval {
8080
return TimeInterval(value)
8181
}
8282

8383
static func hours(_ value: Int) -> TimeInterval {
84-
return TimeInterval(60 * value)
84+
return TimeInterval(60 * 60 * value)
8585
}
8686

8787
static func days(_ value: Int) -> TimeInterval {
88-
return TimeInterval((60 * value) * 24)
88+
return TimeInterval((60 * 60 * value) * 24)
8989
}
9090
}

0 commit comments

Comments
 (0)