* timemono_sub - subtract a relative time from a monotonic time * @mono: the monotonic time. * @rel: the relative time. * * This returns a well formed struct timemono of @mono - @rel. * * Example: * // We do one every second. * static struct timemono previous_time(void) * { * return timemono_sub(time_mono(), time_from_msec(1000)); * } */
| 453 | * } |
| 454 | */ |
| 455 | static inline struct timemono timemono_sub(struct timemono mono, struct timerel rel) |
| 456 | { |
| 457 | struct timemono t; |
| 458 | |
| 459 | t.ts = time_sub_(mono.ts, rel.ts); |
| 460 | return t; |
| 461 | } |
| 462 | |
| 463 | |
| 464 | static inline struct timespec time_add_(struct timespec a, struct timespec b) |