Skip to content

Commit

Permalink
Remove NSEC_PER_SEC since non-Darwin don't have it
Browse files Browse the repository at this point in the history
  • Loading branch information
grdsdev committed Jan 20, 2024
1 parent f8fe8d4 commit 6e732a5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Sources/Realtime/V2/RealtimeClientV2.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import ConcurrencyExtras
import Foundation
@_spi(Internal) import _Helpers
import Dispatch

#if canImport(FoundationNetworking)
import FoundationNetworking
Expand Down Expand Up @@ -242,7 +241,7 @@ public actor RealtimeClientV2 {
guard let self else { return }

while !Task.isCancelled {
try? await Task.sleep(nanoseconds: NSEC_PER_SEC * UInt64(config.heartbeatInterval))
try? await Task.sleep(nanoseconds: 1_000_000_000 * UInt64(config.heartbeatInterval))
if Task.isCancelled {
break
}
Expand Down

0 comments on commit 6e732a5

Please sign in to comment.