-
-
Save lujjjh/e92cb9904f8ec8bb42829cea0f6c2400 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" | |
"time" | |
"unsafe" | |
) | |
type Time struct { | |
_ uint64 | |
ext int64 | |
} | |
func main() { | |
t := time.Now() | |
u := (*Time)(unsafe.Pointer(&t)) | |
fmt.Println(u.ext) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment