Example:
auto content = readProcFile("/proc/stat");
auto cpuTimes = parseCpuStat(content);
writeln("User time: ", cpuTimes[0]);ulong[] parseCpuStat(string content) @safe nothrowParses /proc/stat CPU statistics.
content | Content of /proc/stat file. |
Example:
auto content = readProcFile("/proc/stat");
auto cpuTimes = parseCpuStat(content);
writeln("User time: ", cpuTimes[0]);