feat: moved all reader's values to the Codable protocol

This commit is contained in:
Serhiy Mytrovtsiy
2023-06-27 17:09:38 +02:00
parent 91603406a2
commit 1e0ba3b61f
17 changed files with 327 additions and 169 deletions

View File

@@ -9,7 +9,7 @@
import Cocoa
import Kit
public struct CPU_Load: value_t {
public struct CPU_Load: value_t, Codable {
var totalUsage: Double = 0
var usagePerCore: [Double] = []
var usageECores: Double? = nil
@@ -26,7 +26,7 @@ public struct CPU_Load: value_t {
}
}
public struct CPU_Limit {
public struct CPU_Limit: Codable {
var scheduler: Int = 0
var cpus: Int = 0
var speed: Int = 0