mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
feat: added snapshot data to Network widget
This commit is contained in:
@@ -16,7 +16,12 @@ import Kit
|
||||
|
||||
public struct Network_entry: TimelineEntry {
|
||||
public static let kind = "NetworkWidget"
|
||||
public static var snapshot: Network_entry = Network_entry()
|
||||
public static var snapshot: Network_entry = Network_entry(value: Network_Usage(
|
||||
bandwidth: Bandwidth(upload: 1_238_400, download: 18_732_000),
|
||||
raddr: Network_addr(v4: "192.168.0.1"),
|
||||
interface: Network_interface(displayName: "Stats"),
|
||||
status: true
|
||||
))
|
||||
|
||||
public var date: Date {
|
||||
Calendar.current.date(byAdding: .second, value: 5, to: Date())!
|
||||
|
||||
Reference in New Issue
Block a user