diff --git a/docs/index.html b/docs/index.html
index de41901f6..c19e301b9 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -192,27 +192,27 @@
Kwargs
if self.stopped:
return True
- t_start = time.perf_counter() # Change to _ns when PyPy supports it
+ t_start = time.perf_counter_ns()
self._handle_events(self.events)
- t_pre = time.perf_counter()
+ t_pre = time.perf_counter_ns()
if not self.paused:
if self.mb.tick():
# breakpoint reached
self.plugin_manager.handle_breakpoint()
else:
self.frame_count += 1
- t_tick = time.perf_counter()
+ t_tick = time.perf_counter_ns()
self._post_tick()
- t_post = time.perf_counter()
+ t_post = time.perf_counter_ns()
- secs = t_pre - t_start
- self.avg_pre = 0.9 * self.avg_pre + 0.1*secs
+ nsecs = t_pre - t_start
+ self.avg_pre = 0.9 * self.avg_pre + (0.1*nsecs/1_000_000_000)
- secs = t_tick - t_pre
- self.avg_tick = 0.9 * self.avg_tick + 0.1*secs
+ nsecs = t_tick - t_pre
+ self.avg_tick = 0.9 * self.avg_tick + (0.1*nsecs/1_000_000_000)
- secs = t_post - t_tick
- self.avg_post = 0.9 * self.avg_post + 0.1*secs
+ nsecs = t_post - t_tick
+ self.avg_post = 0.9 * self.avg_post + (0.1*nsecs/1_000_000_000)
return self.quitting
@@ -283,7 +283,7 @@ Kwargs
avg_emu = self.avg_pre + self.avg_tick + self.avg_post
self.window_title = "CPU/frame: %0.2f%%" % ((self.avg_pre + self.avg_tick) / SPF * 100)
tolerance = 0.001 # 1ms. Avoid infinity and division by zero
- self.window_title += " Emulation: x%s" % (round(SPF / avg_emu) if avg_emu > tolerance else 'INF')
+ self.window_title += " Emulation: x%s" % (round(SPF / avg_emu) if avg_emu > tolerance else "INF")
if self.paused:
self.window_title += "[PAUSED]"
self.window_title += self.plugin_manager.window_title()
@@ -606,27 +606,27 @@ Methods
if self.stopped:
return True
- t_start = time.perf_counter() # Change to _ns when PyPy supports it
+ t_start = time.perf_counter_ns()
self._handle_events(self.events)
- t_pre = time.perf_counter()
+ t_pre = time.perf_counter_ns()
if not self.paused:
if self.mb.tick():
# breakpoint reached
self.plugin_manager.handle_breakpoint()
else:
self.frame_count += 1
- t_tick = time.perf_counter()
+ t_tick = time.perf_counter_ns()
self._post_tick()
- t_post = time.perf_counter()
+ t_post = time.perf_counter_ns()
- secs = t_pre - t_start
- self.avg_pre = 0.9 * self.avg_pre + 0.1*secs
+ nsecs = t_pre - t_start
+ self.avg_pre = 0.9 * self.avg_pre + (0.1*nsecs/1_000_000_000)
- secs = t_tick - t_pre
- self.avg_tick = 0.9 * self.avg_tick + 0.1*secs
+ nsecs = t_tick - t_pre
+ self.avg_tick = 0.9 * self.avg_tick + (0.1*nsecs/1_000_000_000)
- secs = t_post - t_tick
- self.avg_post = 0.9 * self.avg_post + 0.1*secs
+ nsecs = t_post - t_tick
+ self.avg_post = 0.9 * self.avg_post + (0.1*nsecs/1_000_000_000)
return self.quitting