rewrite with python3

This commit is contained in:
Yuxin Wu
2020-06-27 15:21:17 -07:00
parent 659742c929
commit 476bdd5971
25 changed files with 179 additions and 279 deletions
+1 -5
View File
@@ -1,8 +1,4 @@
#!/usr/bin/env python2
# -*- coding: UTF-8 -*-
# File: timer.py
# Date: Wed Jun 17 23:25:54 2015 +0800
# Author: Yuxin Wu
import time, functools
from collections import defaultdict
@@ -20,7 +16,7 @@ class TotalTimer(object):
self.times = defaultdict(float)
def __del__(self):
for k, v in self.times.iteritems():
for k, v in self.times.items():
logger.info("{} took {} seconds in total.".format(k, v))
_total_timer = TotalTimer()