Commit db904f5
committed
timing: replace deprecated gettimeofday() with clock()
gettimeofday() got marked obsolete in POSIX.1-2008 and removed
in POSIX.1-2024.
Alternatives:
* clock() introduced in C89, part of POSIX.1-1995 (and meant for CPU time)
* timespec_get() introduced in C11 and part of POSIX.1-2024
* clock_gettime() introduced in POSIX.1-1995,
absent in ISO C so requires POSIX feature macros1 parent 32b597b commit db904f5
1 file changed
+4
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
| 94 | + | |
| 95 | + | |
100 | 96 | | |
101 | 97 | | |
102 | 98 | | |
| |||
0 commit comments