Skip to content

Commit

Permalink
Merge pull request #23 from singchia/bench/resource
Browse files Browse the repository at this point in the history
fix words
  • Loading branch information
singchia authored Jul 6, 2023
2 parents 77251d8 + a61a532 commit ed69786
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func main() {
tick := t.Add(time.Second)
// wait for it
<-tick.C()
// tick fired as time is up, calcurate and print the elapse
// tick fired as time is up, calculate and print the elapse
log.Printf("time elapsed: %fs\n", time.Now().Sub(t1).Seconds())
}
```
Expand All @@ -72,7 +72,7 @@ func main() {
// add a tick in 1s with current time and a async handler
t.Add(time.Second, timer.WithData(time.Now()), timer.WithHandler(func(event *timer.Event) {
defer wg.Done()
// tick fired as time is up, calcurate and print the elapse
// tick fired as time is up, calculate and print the elapse
log.Printf("time elapsed: %fs\n", time.Now().Sub(event.Data.(time.Time)).Seconds())
}))

Expand Down Expand Up @@ -102,7 +102,7 @@ func main() {
// wait for it cyclically
<-tick.C()
t2 := time.Now()
// calcurate and print the elapse
// calculate and print the elapse
log.Printf("time elapsed: %fs\n", t2.Sub(t1).Seconds())
t1 = t2
}
Expand Down

0 comments on commit ed69786

Please sign in to comment.