| 311 | } |
| 312 | |
| 313 | static inline struct timespec time_sub_(struct timespec recent, |
| 314 | struct timespec old) |
| 315 | { |
| 316 | struct timespec diff; |
| 317 | |
| 318 | diff.tv_sec = TIME_CHECK(recent).tv_sec - TIME_CHECK(old).tv_sec; |
| 319 | if (old.tv_nsec > recent.tv_nsec) { |
| 320 | diff.tv_sec--; |
| 321 | diff.tv_nsec = 1000000000 + recent.tv_nsec - old.tv_nsec; |
| 322 | } else |
| 323 | diff.tv_nsec = recent.tv_nsec - old.tv_nsec; |
| 324 | |
| 325 | return TIME_CHECK(diff); |
| 326 | } |
| 327 | |
| 328 | /** |
| 329 | * time_sub - subtract two relative times |
no outgoing calls
no test coverage detected