Should use sysinfo struct instead of running uptime command #2
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Created by: Nicd
Currently the uptime is retrieved with the uptime command and the output is parsed with a regex. This is unreliable (uptime format may change) and a clumsy way overall.
The sysinfo struct described on http://man7.org/linux/man-pages/man2/sysinfo.2.html should be used instead. Reading the struct will also have better performance since no additional processes are spawned.
Created by: Nicd
Get uptime from sys/sysinfo.h instead of parsing uptime output. Fixes #2
→ <<cset 0c463f24bf88>>