/proc/uptime

This file contains the length of time since the system was booted, as well as the amount of time since then that the system has been idle. Both are given as floating-point values, in seconds.

Example output:

375455.86 319845.47