Browse Source

more accurate timing

Zachary Pavlov 18 years ago
parent
commit
16ee78a4be
1 changed files with 2 additions and 2 deletions
  1. 2 2
      direct/src/showbase/PythonUtil.py

+ 2 - 2
direct/src/showbase/PythonUtil.py

@@ -2965,9 +2965,9 @@ def quickProfile(name="unnamed"):
             # at the time that PythonUtil is loaded
             # at the time that PythonUtil is loaded
             if(not base.config.GetBool("profile-debug",0)):
             if(not base.config.GetBool("profile-debug",0)):
                 #dumb timings
                 #dumb timings
-                st=time.time()
+                st=globalClock.getRealTime()
                 f(*args,**kArgs)
                 f(*args,**kArgs)
-                s=time.time()-st
+                s=globalClock.getRealTime()-st
                 print "Function %s.%s took %s seconds"%(f.__module__, f.__name__,s)
                 print "Function %s.%s took %s seconds"%(f.__module__, f.__name__,s)
             else:
             else:
                 #detailed profile, stored in base.stats under (
                 #detailed profile, stored in base.stats under (