Closed
Description
http://play.golang.org/p/pIagpaYGak
package main
import "fmt"
import "time"
func main() {
var t time.Duration
t = 1e3
fmt.Printf("%s\n", t)
t -= 1e3
fmt.Printf("%s\n", t)
t -= 1e3
fmt.Printf("%s\n", t)
t = 1e6
fmt.Printf("%s\n", t)
t -= 1e6
fmt.Printf("%s\n", t)
t -= 1e6
fmt.Printf("%s\n", t)
t = 1e9
fmt.Printf("%s\n", t)
t -= 1e9
fmt.Printf("%s\n", t)
t -= 1e9
fmt.Printf("%s\n", t)
}
prints
1µs
0
-1µs
1ms
0
-1ms
1s
0
-1s
It should show either ns because that's the internal resolution or s because that's the SI unit.