File tree Expand file tree Collapse file tree 1 file changed +21
-15
lines changed Expand file tree Collapse file tree 1 file changed +21
-15
lines changed Original file line number Diff line number Diff line change 11import time
2- import platform
2+ try :
3+ _clock = time .perf_counter # time.clock is deprecated in Python 3.3, gone in 3.8
4+ except :
5+ _clock = time .clock
6+ _tick = 1 / 60
7+
8+ #import platform
39import queue
410import json
511
1723INTERACT_PERIOD = 1.0 / MAX_RENDERS
1824USER_FRACTION = 0.5
1925
20- _plat = platform .system ()
21-
22- if _plat == 'Windows' :
23- # On Windows, the best timer is supposedly time.clock()
24- _clock = time .clock
25- _tick = 1 / 60
26- elif _plat == 'Macintosh' :
27- # On platforms other than Windows, the best timer is supposedly time.time()
28- _clock = time .time
29- _tick = 0.01
30- else : # 'Unix'
31- # On platforms other than Windows, the best timer is supposedly time.time()
32- _clock = time .time
33- _tick = 0.01 # though sleep seems to be accurate at the 1 millisecond level
26+ ## _plat = platform.system()
27+
28+ ## if _plat == 'Windows':
29+ ## # On Windows, the best timer is supposedly time.clock()
30+ ## _clock = time.clock
31+ ## _tick = 1/60
32+ ## elif _plat == 'Macintosh':
33+ ## # On platforms other than Windows, the best timer is supposedly time.time()
34+ ## _clock = time.time
35+ ## _tick = 0.01
36+ ## else: # 'Unix'
37+ ## # On platforms other than Windows, the best timer is supposedly time.time()
38+ ## _clock = time.time
39+ ## _tick = 0.01 # though sleep seems to be accurate at the 1 millisecond level
3440
3541##Possible way to get one-millisecond accuracy in sleep on Windows:
3642##http://msdn.microsoft.com/en-us/library/windows/desktop/ms686298(v=vs.85).aspx
You can’t perform that action at this time.
0 commit comments