Did I find the right examples for you? yes no

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)
Returns uptime in seconds if even remotely possible, or None if not.

        def uptime():
    """Returns uptime in seconds if even remotely possible, or None if not."""
    if __boottime is not None:
        return time.time() - __boottime

    return {'amiga': _uptime_amiga,
            'aros12': _uptime_amiga,
            'beos5': _uptime_beos,
            'cygwin': _uptime_linux,
            'darwin': _uptime_osx,
            'haiku1': _uptime_beos,
            'linux': _uptime_linux,
            'linux-armv71': _uptime_linux,
            'linux2': _uptime_linux,
            'mac': _uptime_mac,
            'minix3': _uptime_minix,
            'riscos': _uptime_riscos,
            'sunos5': _uptime_solaris,
            'syllable': _uptime_syllable,
            'win32': _uptime_windows,
            'wince': _uptime_windows}.get(sys.platform, _uptime_bsd)() or \
           _uptime_bsd() or _uptime_plan9() or _uptime_linux() or \
           _uptime_windows() or _uptime_solaris() or _uptime_beos() or \
           _uptime_amiga() or _uptime_riscos() or _uptime_posix() or \
           _uptime_syllable() or _uptime_mac()
        


src/t/t/ttop-0.7.2/ttop/core.py   ttop(Download)
    def update(self):
        self.uptime = uptime.uptime()
        up = self.uptime
        self.days, up = int(up / 86400), up % 86400
        self.hours, up = int(up / 3600), up % 3600

src/t/t/ttop-HEAD/ttop/core.py   ttop(Download)
    def update(self):
        self.uptime = uptime.uptime()
        up = self.uptime
        self.days, up = int(up / 86400), up % 86400
        self.hours, up = int(up / 3600), up % 3600