Update example

This commit is contained in:
nxshock 2022-08-10 21:09:50 +05:00
parent d9e1bdd99d
commit 7770ec3d8a

View File

@ -19,7 +19,7 @@ import (
func main() { func main() {
stepsCount := 1000 stepsCount := 1000
eta := eta.New(time.Minute, stepsCount) eta := eta.New(stepsCount)
processed := 0 processed := 0
@ -39,6 +39,5 @@ func main() {
time.Sleep(time.Second) // Update progress every second time.Sleep(time.Second) // Update progress every second
fmt.Fprintf(os.Stderr, "\rProcessed %d of %d, ETA: %s", processed, stepsCount, eta.Eta().Format("15:04:05")) fmt.Fprintf(os.Stderr, "\rProcessed %d of %d, ETA: %s", processed, stepsCount, eta.Eta().Format("15:04:05"))
} }
} }
``` ```