mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-10-01 03:43:42 +08:00
openpilot v0.3.7 release
This commit is contained in:
@@ -14,6 +14,12 @@ class Profiler(object):
|
||||
self.cp.append((name, tt - self.last_time))
|
||||
self.last_time = tt
|
||||
|
||||
def reset(self, enabled=False):
|
||||
self.enabled = enabled
|
||||
self.cp = []
|
||||
self.start_time = sec_since_boot()
|
||||
self.last_time = self.start_time
|
||||
|
||||
def display(self):
|
||||
if not self.enabled:
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user