Skip to content
This repository has been archived by the owner on Nov 26, 2023. It is now read-only.

Commit

Permalink
Merge pull request #84 from EricThomson/ptime_fix
Browse files Browse the repository at this point in the history
fixed ptime issue for Python 3.8
  • Loading branch information
kushalkolar committed Feb 28, 2022
2 parents f2ee868 + 02a08e2 commit cf75946
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions mesmerize/pyqtgraphCore/ptime.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,17 @@

def winTime():
"""Return the current time in seconds with high precision (windows version, use Manager.time() to stay platform independent)."""
return systime.clock() + START_TIME
return systime.process_time() + START_TIME
#return systime.time()

def unixTime():
"""Return the current time in seconds with high precision (unix version, use Manager.time() to stay platform independent)."""
return systime.time()

if sys.platform.startswith('win'):
cstart = systime.clock() ### Required to start the clock in windows
cstart = systime.process_time() ### Required to start the clock in windows
START_TIME = systime.time() - cstart

time = winTime
else:
time = unixTime

0 comments on commit cf75946

Please sign in to comment.