summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2019-08-23 07:44:32 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2019-08-23 07:44:32 (GMT)
commit27e898fbe5ef8b19dad1b9e1415b5cdac55650cf (patch)
treef0d48bcab9a705f1a30d3d6ca512815f8af95234
parent5dae5dacab500b01aec5f31e53e482ce0cb5991b (diff)
downloadmisc-fred-27e898fbe5ef8b19dad1b9e1415b5cdac55650cf.zip
misc-fred-27e898fbe5ef8b19dad1b9e1415b5cdac55650cf.tar.gz
misc-fred-27e898fbe5ef8b19dad1b9e1415b5cdac55650cf.tar.bz2
sassw: include time taken for rebuilding css
-rwxr-xr-xbin/sassw5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/sassw b/bin/sassw
index acf3692..56ecdef 100755
--- a/bin/sassw
+++ b/bin/sassw
@@ -11,6 +11,7 @@ import os
import pyinotify
import subprocess
import sys
+import time
filename = sys.argv[1]
@@ -26,8 +27,10 @@ class EventManager(pyinotify.ProcessEvent):
if event.pathname in sources:
filename = os.path.basename(event.pathname)
print(f'{filename} changed, building', end='')
+ t0 = time.time()
build()
- print('.')
+ elapsed_time = time.time() - t0
+ print(' (%.2fs)' % (time.time() - t0))
build()
wm = pyinotify.WatchManager()