Standard library / time

time.Millisecond

One millisecond equals 1000000 nanoseconds. Multiply an integer converted to Duration by this unit; check overflow for large inputs. Expected stdout: '1000000\n'.

Formal Syntax & Structure

go syntaxgo
const Millisecond Duration = 1000000

Working Example

Example Snippetgo
package main
import (  "fmt"  "time")
func main() { fmt.Println(time.Millisecond.Nanoseconds()) }
Go Reference