changeset 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 f5847d29e838
children d3a5d1929ad2
files upreckon/unix.py upreckon/win32.py
diffstat 2 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/upreckon/unix.py	Thu Oct 03 01:19:09 2013 +0300
+++ b/upreckon/unix.py	Sun Jan 19 00:50:27 2014 +0000
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2011 Chortos-2 <chortos@inbox.lv>
+# Copyright (c) 2010-2014 Chortos-2 <chortos@inbox.lv>
 
 from __future__ import division, with_statement
 
@@ -9,7 +9,7 @@
 import os, sys, time
 
 try:
-	from time import steady as clock
+	from time import monotonic as clock
 except ImportError:
 	if sys.platform.startswith('java'):
 		from time import clock
--- a/upreckon/win32.py	Thu Oct 03 01:19:09 2013 +0300
+++ b/upreckon/win32.py	Sun Jan 19 00:50:27 2014 +0000
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2012 Chortos-2 <chortos@inbox.lv>
+# Copyright (c) 2010-2014 Chortos-2 <chortos@inbox.lv>
 
 from __future__ import division, with_statement
 
@@ -8,10 +8,14 @@
 from ctypes import *
 from ctypes.wintypes import *
 from msvcrt import getch as pause
-from time import clock
 import os, subprocess, sys, time
 
 try:
+	from time import monotonic as clock
+except ImportError:
+	from time import clock
+
+try:
 	from _winreg import *
 except ImportError:
 	from winreg import *