Created
September 29, 2015 06:26
-
-
Save rfjakob/6d3359a97d22f32083bc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"syscall" | |
"time" | |
) | |
func main() { | |
t := time.Date(1960, time.January, 10, 23, 0, 0, 0, time.UTC) | |
nsec := t.UnixNano() | |
tv := syscall.NsecToTimeval(nsec) | |
fmt.Printf(" t=%v \n nsec=%d \n tv.Sec=%d tv.Usec=%d \n", t, nsec, tv.Sec, tv.Usec) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment