Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Baekalfen committed Oct 22, 2022
1 parent 12416d2 commit b26a059
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -192,27 +192,27 @@ <h2 id="kwargs">Kwargs</h2>
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

Expand Down Expand Up @@ -283,7 +283,7 @@ <h2 id="kwargs">Kwargs</h2>
avg_emu = self.avg_pre + self.avg_tick + self.avg_post
self.window_title = &#34;CPU/frame: %0.2f%%&#34; % ((self.avg_pre + self.avg_tick) / SPF * 100)
tolerance = 0.001 # 1ms. Avoid infinity and division by zero
self.window_title += &#34; Emulation: x%s&#34; % (round(SPF / avg_emu) if avg_emu &gt; tolerance else &#39;INF&#39;)
self.window_title += &#34; Emulation: x%s&#34; % (round(SPF / avg_emu) if avg_emu &gt; tolerance else &#34;INF&#34;)
if self.paused:
self.window_title += &#34;[PAUSED]&#34;
self.window_title += self.plugin_manager.window_title()
Expand Down Expand Up @@ -606,27 +606,27 @@ <h3>Methods</h3>
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</code></pre>
</details>
Expand Down

0 comments on commit b26a059

Please sign in to comment.