projects
/
pysvrt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1c9bd21
)
OCD cosmetics.
author
Francois Fleuret
<francois@fleuret.org>
Fri, 16 Jun 2017 14:19:56 +0000
(16:19 +0200)
committer
Francois Fleuret
<francois@fleuret.org>
Fri, 16 Jun 2017 14:19:56 +0000
(16:19 +0200)
cnn-svrt.py
patch
|
blob
|
history
diff --git
a/cnn-svrt.py
b/cnn-svrt.py
index
592f982
..
90b4c6d
100755
(executable)
--- a/
cnn-svrt.py
+++ b/
cnn-svrt.py
@@
-88,13
+88,16
@@
print(Fore.RED + 'Logging into ' + args.log_file + Style.RESET_ALL)
def log_string(s):
global pred_log_t
+
t = time.time()
if pred_log_t is None:
elapsed = 'start'
else:
elapsed = '+{:.02f}s'.format(t - pred_log_t)
+
pred_log_t = t
+
s = Fore.BLUE + time.ctime() + ' ' + Fore.GREEN + elapsed + Style.RESET_ALL + ' ' + s
log_file.write(s + '\n')
log_file.flush()