()
Return the system boot time expressed in seconds since the epoch.
Return the system boot time expressed in seconds since the epoch.
Return the system boot time expressed in seconds since the epoch .
def boot_time():
    """Return the system boot time expressed in seconds since the epoch."""
    global BOOT_TIME
    with open('/proc/stat', 'rb') as f:
        for line in f:
            if line.startswith(b'btime'):
                ret = float(line.strip().split()[1])
                BOOT_TIME = ret
                return ret
        raise RuntimeError("line 'btime' not found in /proc/stat")
def boot_time ( ) : global BOOT_TIME with open ( '/proc/stat' , 'rb' ) as f : for line in f : if line . startswith ( b'btime' ) : ret = float ( line . strip ( ) . split ( ) [ 1 ] ) BOOT_TIME = ret return ret raise RuntimeError ( "line 'btime' not found in /proc/stat" )