Mercurial > ~astiob > upreckon > hgweb
comparison upreckon/unix.py @ 250:acd70a60bc17
Finished embracing time.monotonic in Python code
_unix does not use monotonic clocks yet.
author | Oleg Oshmyan <chortos@inbox.lv> |
---|---|
date | Sun, 19 Jan 2014 00:50:27 +0000 |
parents | d9eb7d958b6d |
children | d3a5d1929ad2 |
comparison
equal
deleted
inserted
replaced
247:f5847d29e838 | 250:acd70a60bc17 |
---|---|
1 # Copyright (c) 2010-2011 Chortos-2 <chortos@inbox.lv> | 1 # Copyright (c) 2010-2014 Chortos-2 <chortos@inbox.lv> |
2 | 2 |
3 from __future__ import division, with_statement | 3 from __future__ import division, with_statement |
4 | 4 |
5 from .compat import * | 5 from .compat import * |
6 from .exceptions import * | 6 from .exceptions import * |
7 | 7 |
8 from subprocess import Popen | 8 from subprocess import Popen |
9 import os, sys, time | 9 import os, sys, time |
10 | 10 |
11 try: | 11 try: |
12 from time import steady as clock | 12 from time import monotonic as clock |
13 except ImportError: | 13 except ImportError: |
14 if sys.platform.startswith('java'): | 14 if sys.platform.startswith('java'): |
15 from time import clock | 15 from time import clock |
16 else: | 16 else: |
17 from time import time as clock | 17 from time import time as clock |