in reply to parsing output of uptime

you could always parse the output of /proc/uptime and make your own calculations for how long it has been up.