mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
feat: added an option to show ICMP status and latency in the text widget (allows to show ping latency in the menu bar)
This commit is contained in:
@@ -41,7 +41,12 @@ open class Reader<T: Codable>: NSObject, ReaderInternal_p {
|
||||
public var log: NextLog {
|
||||
NextLog.shared.copy(category: "\(String(describing: self))")
|
||||
}
|
||||
public var value: T?
|
||||
private let valueQueue = DispatchQueue(label: "eu.exelban.readerActiveQueue")
|
||||
private var _value: T?
|
||||
public var value: T? {
|
||||
get { self.valueQueue.sync { self._value } }
|
||||
set { self.valueQueue.sync { self._value = newValue } }
|
||||
}
|
||||
public var name: String {
|
||||
String(NSStringFromClass(type(of: self)).split(separator: ".").last ?? "unknown")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user