return ktime_add_ns(kt, usec * 1000); } static inline ktime_t ktime_add_ms(const ktime_t kt, const u64 msec) { return ktime_add_ns(kt, msec * NSEC_PER_MSEC); } static inline ktime_t ktime_sub_us(const ktime_t kt, const u64 usec) { return ktime_sub_ns(kt, usec ...
timer->expires = ktime_add_ns(timer->expires, incr * orun);if(timer->expires.tv64 > now.tv64)returnorun;/* * This (and the ktime_add() below) is the * correction for exact: */orun++; } timer->expires =ktime_add_safe(timer->expires, interval);returnorun; } 开发者ID:miet...
Instead you want to use CLOCK_BOOTTIME. Hence add bpf_ktime_get_boot_ns() as a mirror of bpf_ktime_get_ns() based around CLOCK_BOOTTIME instead of CLOCK_MONOTONIC. Signed-off-by: Maciej Żenczykowski <maze@google.com> Signed-off-by: Alexei Starovoitov <ast@kernel...