@@ -29,10 +29,10 @@ FileColumns = enum.IntEnum("FileColumns", {"Filename": 0, "Size": 1})
import time
def timeit(f):
def timed(*args, **kw):
- ts = time.time()
+ ts = time.monotonic()
print ("func:%r calling" % f.__name__)
result = f(*args, **kw)
- te = time.time()
+ te = time.monotonic()
print ('func:%r args:[%r, %r] took: %2.4f sec' % \
(f.__name__, args, kw, te-ts))
return result
@@ -1252,9 +1252,9 @@ to your build configuration.
if self.snapshot and tmpfsdir:
newrootfs = os.path.join(tmpfsdir, os.path.basename(self.rootfs)) + "." + str(os.getpid())
logger.info("Copying rootfs to %s" % newrootfs)
- copy_start = time.time()
+ copy_start = time.monotonic()
shutil.copyfile(self.rootfs, newrootfs)
- logger.info("Copy done in %s seconds" % (time.time() - copy_start))
+ logger.info("Copy done in %s seconds" % (time.monotonic() - copy_start))
self.rootfs = newrootfs
# Don't need a second copy now!
self.snapshot = False