From 8cdea45a2a54fa619d670ff30cfdf96308853f7e Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Sun, 18 Jun 2017 12:11:27 +0200 Subject: [PATCH] Fix. --- cnn-svrt.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cnn-svrt.py b/cnn-svrt.py index 142b81f..704b003 100755 --- a/cnn-svrt.py +++ b/cnn-svrt.py @@ -250,16 +250,18 @@ def int_to_suffix(n): class vignette_logger(): def __init__(self, delay_min = 60): self.start_t = time.time() + self.last_t = self.start_t self.delay_min = delay_min def __call__(self, n, m): t = time.time() - if t > self.start_t + self.delay_min: + if t > self.last_t + self.delay_min: dt = (t - self.start_t) / m log_string('sample_generation {:d} / {:d}'.format( m, n), ' [ETA ' + time.ctime(time.time() + dt * (n - m)) + ']' ) + self.last_t = t ###################################################################### -- 2.39.5