Did I find the right examples for you? yes no

All Samples(5)  |  Call(5)  |  Derive(0)  |  Import(0)
Return the system boot time expressed in seconds since the epoch.
This is also available as psutil.BOOT_TIME.

        def boot_time():
    """Return the system boot time expressed in seconds since the epoch.
    This is also available as psutil.BOOT_TIME.
    """
    # Note: we are not caching this because it is subject to
    # system clock updates.
    return _psplatform.boot_time()
        


src/p/s/psutil-2.1.1/examples/top.py   psutil(Download)
    print_line(" Processes: %s (%s)" % (num_procs, ' '.join(st)))
    # load average, uptime
    uptime = datetime.now() - datetime.fromtimestamp(psutil.boot_time())
    av1, av2, av3 = os.getloadavg()
    line = " Load average: %.2f %.2f %.2f  Uptime: %s" \

src/s/a/salt-HEAD/salt/modules/ps.py   salt(Download)
    '''
    try:
        b_time = int(psutil.boot_time())
    except AttributeError:
        # get_boot_time() has been removed in newer psutil versions, and has

src/s/a/salt-thin-HEAD/salt/modules/ps.py   salt-thin(Download)
    '''
    try:
        b_time = int(psutil.boot_time())
    except AttributeError:
        # get_boot_time() has been removed in newer psutil versions, and has

src/h/t/HTPC-Manager-HEAD/modules/stats.py   HTPC-Manager(Download)
    def uptime(self):
        try:
            if psutil.version_info >= (2, 0, 0):
                b = psutil.boot_time()
            else:

src/p/s/psutil-2.1.1/test/test_psutil.py   psutil(Download)
    def test_boot_time(self):
        bt = psutil.boot_time()
        self.assertIsInstance(bt, float)
        self.assertGreater(bt, 0)
        self.assertLess(bt, time.time())