A simply package for timing your code. The intention is to provide a simple, light-weight library for benchmarking specific bits of your code when need be.
package main
import (
"fmt"
"github.com/bradhe/stopwatch"
)
func main() {
watch := stopwatch.Start()
// Do some work.
watch.Stop()
fmt.Printf("Milliseconds elapsed: %v\n", watch.Milliseconds())
}
- Fork and fix/implement in a branch.
- Make sure tests pass.
- Make sure you've added new coverage.
- Submit a PR.