def _get_boot_time():
    f = open('/proc/stat', 'r')
    try:
        for line in f:
            if line.startswith('btime'):
                return float(line.strip().split()[1])
        raise RuntimeError("line not found")
    finally:
        f.close()
Return system boot time (epoch in seconds)
dataset/ETHPy150Open packages/psutil/psutil/_pslinux.py/_get_boot_time