sassw: include time taken for rebuilding css

This commit is contained in:
Frédéric Péters 2019-08-23 09:44:32 +02:00
parent 5dae5dacab
commit 27e898fbe5
1 changed files with 4 additions and 1 deletions

View File

@ -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()