Hi there,
it looks that the result of a call to the usageCPU doesn't update the returned values.
This my my fragment of code (99% identical to the documentation):
var sys = System()
let cpuUsage = sys.usageCPU()
cpuUsageSystem.stringValue = "\(Int(cpuUsage.system))%"
cpuUsageUser.stringValue = "\(Int(cpuUsage.user))%"
cpuUsageIdle.stringValue = "\(Int(cpuUsage.idle))%"
cpuUsageNice.stringValue = "\(Int(cpuUsage.nice))%"
Hi there, it looks that the result of a call to the usageCPU doesn't update the returned values. This my my fragment of code (99% identical to the documentation):