| 145 | // This returns immediately, so timing in test_destructor() isn't affected by |
| 146 | // waiting on the actual filesystem. |
| 147 | extern "C" int fsync(int fd) { |
| 148 | if (fsync_log) { |
| 149 | fsync_log->fsync(fd); |
| 150 | } |
| 151 | return 0; |
| 152 | } |
| 153 | |
| 154 | int time_diff(const struct timeval* t1, const struct timeval* t2) { |
| 155 | return (t2->tv_usec - t1->tv_usec) + (t2->tv_sec - t1->tv_sec) * 1000000; |
no test coverage detected