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
+25.2k Golang : Create PDF file from HTML file
+10.7k Golang : ISO8601 Duration Parser example
+6.4k Javascript : Generate random key with specific length
+48.7k Golang : Upload file from web browser to server
+5.2k Linux/Unix/MacOSX : Find out which application is listening to port 80 or use which IP version
+36.8k Golang : Display float in 2 decimal points and rounding up or down
+17.1k Golang : Covert map/slice/array to JSON or XML format
+10k Golang : Check if user agent is a robot or crawler example
+10k Golang : Function wrapper that takes arguments and return result example
+6k Golang : Extract unicode string from another unicode string example
+8.1k Findstr command the Grep equivalent for Windows
+7.4k Golang : Fixing Gorilla mux http.FileServer() 404 problem