Skip to content

Commit

Permalink
fix: correct time calculation in get_current_time function
Browse files Browse the repository at this point in the history
Signed-off-by: Dengfeng Liu <[email protected]>
  • Loading branch information
liudf0716 committed Feb 4, 2025
1 parent 73229e1 commit 42e656b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ebpf/aw-bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct {

static __always_inline __u32 get_current_time(void)
{
__u32 val = bpf_ktime_get_ns() >> 24;
__u32 val = bpf_ktime_get_ns() / 1000000000;
return val ? val : 1;
}

Expand Down

0 comments on commit 42e656b

Please sign in to comment.