perhaps convert latency to a time.Duration and use this instead? http://golang.org/pkg/time/#Duration.Seconds