Skip to content
Commit 71d19214 authored by Maciej Żenczykowski's avatar Maciej Żenczykowski Committed by Alexei Starovoitov
Browse files

bpf: add bpf_ktime_get_boot_ns()



On a device like a cellphone which is constantly suspending
and resuming CLOCK_MONOTONIC is not particularly useful for
keeping track of or reacting to external network events.
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: default avatarMaciej Żenczykowski <maze@google.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 0a05861f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment