1
0
mirror of https://github.com/golang/go synced 2024-10-01 16:28:33 -06:00
go/refactor/eg/testdata/B1.go
Alan Donovan bfcffc697d go.tools/refactor/eg: an example-based refactoring tool.
See refactor/eg/eg.go for details.

LGTM=crawshaw
R=crawshaw, gri, kamil.kisiel, josharian
CC=golang-codereviews
https://golang.org/cl/81010043
2014-04-02 12:24:55 -04:00

18 lines
263 B
Go

// +build ignore
package B1
import "time"
var startup = time.Now()
func example() time.Duration {
before := time.Now()
time.Sleep(1)
return time.Now().Sub(before)
}
func msSinceStartup() int64 {
return int64(time.Now().Sub(startup) / time.Millisecond)
}