| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent dc49561 commit 2fa24c0
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -11,6 +11,7 @@ | |||
| 11 | 11 | #define SIZE 500 | |
| 12 | 12 | ||
| 13 | 13 | int main(void) { | |
| 14 | + struct timespec times[2]; | ||
| 14 | 15 | struct stat st; | |
| 15 | 16 | int fd; | |
| 16 | 17 | int ret; | |
@@ -33,6 +34,15 @@ int main(void) { | |||
| 33 | 34 | assert(ret == 0); | |
| 34 | 35 | assert(st.st_size == SIZE); | |
| 35 | 36 | ||
| 37 | + times[0].tv_sec = 4; | ||
| 38 | + times[0].tv_nsec = 0; | ||
| 39 | + times[1].tv_sec = 9; | ||
| 40 | + times[1].tv_nsec = 0; | ||
| 41 | + assert(0 == futimens(fd, times)); | ||
| 42 | + assert(0 == fstat(fd, &st)); | ||
| 43 | + assert(4 == st.st_atime); | ||
| 44 | + assert(9 == st.st_mtime); | ||
| 45 | + | ||
| 36 | 46 | ret = close(fd); | |
| 37 | 47 | assert(ret == 0); | |
| 38 | 48 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments