|
|
|
@ -23,7 +23,7 @@ class Timer(object):
|
|
|
|
|
self.last_start_step = 0
|
|
|
|
|
self.current_step = 0
|
|
|
|
|
self._is_running = True
|
|
|
|
|
self.ips = 0
|
|
|
|
|
self.cur_ips = 0
|
|
|
|
|
|
|
|
|
|
def start(self):
|
|
|
|
|
self.last_time = time.time()
|
|
|
|
@ -44,7 +44,7 @@ class Timer(object):
|
|
|
|
|
self.last_start_step = self.current_step
|
|
|
|
|
time_used = time.time() - self.last_time
|
|
|
|
|
self.last_time = time.time()
|
|
|
|
|
self.ips = run_steps / time_used
|
|
|
|
|
self.cur_ips = run_steps / time_used
|
|
|
|
|
return time_used / run_steps
|
|
|
|
|
|
|
|
|
|
@property
|
|
|
|
@ -53,7 +53,7 @@ class Timer(object):
|
|
|
|
|
|
|
|
|
|
@property
|
|
|
|
|
def ips(self) -> float:
|
|
|
|
|
return self.ips
|
|
|
|
|
return self.cur_ips
|
|
|
|
|
|
|
|
|
|
@property
|
|
|
|
|
def eta(self) -> str:
|
|
|
|
|