Golang time.Time.Nanosecond() function example
package time
Golang time.Time.Nanosecond() function usage example.
package main
import (
"fmt"
"time"
)
func main() {
now := time.Now()
fmt.Println("Today : ", now.Format(time.ANSIC))
nano := now.Nanosecond()
fmt.Println("Nanosecond : ", nano)
}
Sample output :
Today : Mon Aug 10 11:55:17 2015
Nanosecond : 257731502
Reference :
Advertisement
Something interesting
Tutorials
+13.8k Android Studio : Password input and reveal password example
+7.4k Golang : Fixing Gorilla mux http.FileServer() 404 problem
+41.6k Golang : Convert string to array/slice
+7.6k Golang : Rot13 and Rot5 algorithms example
+34.1k Golang : Call a function after some delay(time.Sleep and Tick)
+6.4k Golang : Test input string for unicode example
+22.1k Golang : Use TLS version 1.2 and enforce server security configuration over client
+21.7k Golang : How to read float value from standard input ?
+9.2k Golang : Handle sub domain with Gin
+12.5k Golang : How to check if a string starts or ends with certain characters or words?
+7.7k SSL : How to check if current certificate is sha1 or sha2 from command line
+23.1k Golang : Calculate time different