mirror of
https://github.com/nxshock/go-eta.git
synced 2024-11-27 05:51:00 +05:00
Update example
This commit is contained in:
parent
d9e1bdd99d
commit
7770ec3d8a
@ -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"))
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
```
|
```
|
Loading…
Reference in New Issue
Block a user