Skip to content

Commit 1a3e651

Browse files
committed
chore: Clean up lint a different way.
1 parent c87843c commit 1a3e651

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

Sources/DispatchAsync/DispatchTimeInterval.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ public enum DispatchTimeInterval: Equatable, Sendable {
3838

3939
internal var rawValue: Int64 {
4040
switch self {
41-
case .seconds(let s): return clampedInt64Product(Int64(s), Int64(NSEC_PER_SEC))
42-
case .milliseconds(let ms): return clampedInt64Product(Int64(ms), Int64(NSEC_PER_MSEC))
43-
case .microseconds(let us): return clampedInt64Product(Int64(us), Int64(NSEC_PER_USEC))
41+
case .seconds(let s): return clampedInt64Product(Int64(s), Int64(kNanosecondsPerSecond))
42+
case .milliseconds(let ms): return clampedInt64Product(Int64(ms), Int64(kNanosecondsPerMillisecond))
43+
case .microseconds(let us): return clampedInt64Product(Int64(us), Int64(kNanoSecondsPerMicrosecond))
4444
case .nanoseconds(let ns): return Int64(ns)
4545
case .never: return Int64.max
4646
}

Sources/DispatchAsync/PackageConstants.swift

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414

15-
// swiftlint:disable identifier_name
16-
package let NSEC_PER_SEC: UInt64 = 1_000_000_000
17-
package let NSEC_PER_MSEC: UInt64 = 1_000_000
18-
package let NSEC_PER_USEC: UInt64 = 1_000
19-
// swiftlint:enable identifier_name
15+
package let kNanosecondsPerSecond: UInt64 = 1_000_000_000
16+
package let kNanosecondsPerMillisecond: UInt64 = 1_000_000
17+
package let kNanoSecondsPerMicrosecond: UInt64 = 1_000

0 commit comments

Comments
 (0)