forked from shirou/gopsutil

[cpu][linux]: rename TimesStatEx to ExTimesStat and share the /proc/stat parser

Rename the public type to follow the NewEx<OS> naming (mem.ExVirtualMemory, sensors.ExTemperature), and document that User and Nice include Guest and GuestNice, the ClocksPerSec conversion, and that deltas can wrap when a counter such as Iowait decreases. Add ExTimesStat.ToTimesStat and route the legacy Times through the same uint64 parseStatLine, so both APIs select rows with the same 7-counter minimum and the float64 values stay float64(ticks) / ClocksPerSec. Only malformed lines (fractions, negative or out-of-range counters) are now skipped by Times instead of being parsed as floats. Shorten the README paragraph and put the decrease caution next to the integer delta sentence.


Author Morax Date Commit Parent 03c5c7c0
+111 -140
4 changed files
+111 -140
4 changed files