diff options
| author | Jon Petersson <jon.petersson@kvadrat.se> | 2023-08-11 16:26:48 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2023-08-28 17:16:06 +0200 |
| commit | bbb542e202b70bf921b050e6022cabb067988410 (patch) | |
| tree | 28f702fb3f710364d45048ea57c2b66ca935d9dd /ios/MullvadLogging/LogFileOutputStream.swift | |
| parent | 6fd0f1213ce886b149516ed0d0a722988f77b277 (diff) | |
| download | mullvadvpn-bbb542e202b70bf921b050e6022cabb067988410.tar.xz mullvadvpn-bbb542e202b70bf921b050e6022cabb067988410.zip | |
Introduce Duration type that mimicks native iOS16 Duration
Diffstat (limited to 'ios/MullvadLogging/LogFileOutputStream.swift')
| -rw-r--r-- | ios/MullvadLogging/LogFileOutputStream.swift | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ios/MullvadLogging/LogFileOutputStream.swift b/ios/MullvadLogging/LogFileOutputStream.swift index 0ffd434c65..a3b7ca4caa 100644 --- a/ios/MullvadLogging/LogFileOutputStream.swift +++ b/ios/MullvadLogging/LogFileOutputStream.swift @@ -7,10 +7,11 @@ // import Foundation +import MullvadTypes /// Interval used for reopening the log file descriptor in the event of failure to open it in /// the first place, or when writing to it. -private let reopenFileLogInterval: TimeInterval = 5 +private let reopenFileLogInterval: Duration = .seconds(5) class LogFileOutputStream: TextOutputStream { private let queue = DispatchQueue(label: "LogFileOutputStreamQueue", qos: .utility) @@ -124,7 +125,7 @@ class LogFileOutputStream: TextOutputStream { } timer.schedule( wallDeadline: .now() + reopenFileLogInterval, - repeating: reopenFileLogInterval + repeating: reopenFileLogInterval.timeInterval ) timer.activate() |
