Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 543 Bytes

README.md

File metadata and controls

32 lines (22 loc) · 543 Bytes

stopwatch

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.

Example

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())
}

Contributing

  1. Fork and fix/implement in a branch.
  2. Make sure tests pass.
  3. Make sure you've added new coverage.
  4. Submit a PR.