def _uptime_mac(): """Returns uptime in seconds or None, on Mac OS.""" try: # Python docs say a clock tick is 1/60th of a second, Mac OS docs say # it's ``approximately'' 1/60th. It's incremented by vertical retraces, # which the Macintosh Plus docs say happen 60.15 times per second. # I don't know if ``approximately'' means it's actually 1/60.15, or # 1/60 on some machines and 1/60.15 on others. return MacOS.GetTicks() / 60.15 except NameError: return None
def time(): return MacOS.GetTicks() / 60.0