Created
May 2, 2018 10:24
-
-
Save zhangyoufu/14942cae6d094ed53ce08a7169c03615 to your computer and use it in GitHub Desktop.
ctime of /dev/null
This file contains hidden or 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" | |
| "unsafe" | |
| ) | |
| const sys_fstat = 17 | |
| func main() { | |
| var st syscall.Stat_t | |
| syscall.Syscall(sys_fstat, 0, uintptr(unsafe.Pointer(&st)), 0) | |
| fmt.Println(time.Unix(st.Ctime, 0)) | |
| } | |
| // random comment to bypass caching |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment