3 digits after comma
This commit is contained in:
parent
809b811148
commit
77db123826
@ -9,6 +9,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
"log"
|
"log"
|
||||||
|
"math/big"
|
||||||
)
|
)
|
||||||
|
|
||||||
// The Watcher struct defines the livereload's logic
|
// The Watcher struct defines the livereload's logic
|
||||||
@ -132,7 +133,7 @@ func (p *Project) install(channel chan bool,wr *sync.WaitGroup) {
|
|||||||
log.Println(pname(p.Name, 1),":",Red(err.Error()))
|
log.Println(pname(p.Name, 1),":",Red(err.Error()))
|
||||||
wr.Done()
|
wr.Done()
|
||||||
} else {
|
} else {
|
||||||
log.Println(pname(p.Name, 5),":", Green("Installed")+ " after", MagentaS(time.Since(start)))
|
log.Println(pname(p.Name, 5),":", Green("Installed")+ " after", MagentaS(big.NewFloat(float64(time.Since(start).Seconds())).Text('f', 3), "s"))
|
||||||
if p.Run {
|
if p.Run {
|
||||||
runner := make(chan bool, 1)
|
runner := make(chan bool, 1)
|
||||||
log.Println(pname(p.Name, 1), ":","Running..")
|
log.Println(pname(p.Name, 1), ":","Running..")
|
||||||
@ -141,7 +142,7 @@ func (p *Project) install(channel chan bool,wr *sync.WaitGroup) {
|
|||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case <-runner:
|
case <-runner:
|
||||||
log.Println(pname(p.Name, 5), ":", Green("Has been run") + " after", MagentaS(time.Since(start)))
|
log.Println(pname(p.Name, 5), ":", Green("Has been run") + " after", MagentaS(big.NewFloat(float64(time.Since(start).Seconds())).Text('f', 3), "s"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -159,7 +160,7 @@ func (p *Project) build() {
|
|||||||
if err := p.GoBuild(); err != nil {
|
if err := p.GoBuild(); err != nil {
|
||||||
log.Println(pname(p.Name, 1), ":", Red(err.Error()))
|
log.Println(pname(p.Name, 1), ":", Red(err.Error()))
|
||||||
} else {
|
} else {
|
||||||
log.Println(pname(p.Name, 5),":", Green("Builded")+ " after", MagentaS(time.Since(start)))
|
log.Println(pname(p.Name, 5),":", Green("Builded")+ " after", MagentaS(big.NewFloat(float64(time.Since(start).Seconds())).Text('f', 3), "s"))
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user