Skip to contentSkip to conversation

Compare *bpf_ktime_get_ns* in userspace

DISCUSSION Gaul, Maximilian 1 participant 1 message Apr 1, 2020 BPF

lore
Share & tools
lore
#0 lore raw

I was just wondering whether there is a way to make the timestamp received in XDP/BPF via *bpf_ktime_get_ns* comparable with the usual functions in user-space such as *clock_gettime(CLOCK_MONOTONIC, &t);*?

Unfortunately, *ktime_get_ns* is defined as the time since system boot, but as far as I know, there is no way in user-space to determine the time since system boot any finer than in seconds.