Fix accidently removed time.Sleep

This commit is contained in:
Tavee Khunbida 2019-01-08 22:21:19 +07:00
parent 4d1304b78c
commit df31f04b26
2 changed files with 2 additions and 2 deletions

View File

@ -227,7 +227,7 @@ func startWatcher(paths []string, ch chan int) {
// Wait 1s before re-build until there is no file change
scheduleTime := time.Now().Add(1 * time.Second)
time.Until(scheduleTime)
time.Sleep(time.Until(scheduleTime))
_, err := buildDebug()
if err != nil {
utils.Notify("Build Failed: "+err.Error(), "bee")

View File

@ -85,7 +85,7 @@ func NewWatcher(paths []string, files []string, isgenerate bool) {
go func() {
// Wait 1s before autobuild until there is no file change.
scheduleTime = time.Now().Add(1 * time.Second)
time.Until(scheduleTime)
time.Sleep(time.Until(scheduleTime))
AutoBuild(files, isgenerate)
if config.Conf.EnableReload {