Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Jowett <[email protected]>
  • Loading branch information
Alan Jowett committed Nov 14, 2024
1 parent 326f755 commit b77fd54
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/bpf_helper_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -493,5 +493,5 @@ EBPF_HELPER(uint64_t, bpf_ktime_get_boot_ms, ());
*/
EBPF_HELPER(uint64_t, bpf_ktime_get_ms, ());
#ifndef __doxygen
#define bpf_ktime_get_ms ((bpf_ktime_get_ns_t)BPF_FUNC_ktime_get_ms)
#define bpf_ktime_get_ms ((bpf_ktime_get_ms_t)BPF_FUNC_ktime_get_ms)
#endif
4 changes: 2 additions & 2 deletions libs/execution_context/ebpf_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2196,7 +2196,7 @@ _ebpf_core_get_time_ns()
{
// cxplat_query_time_since_boot_precise returns time elapsed since
// boot in units of 100 ns.
return cxplat_query_time_since_boot_approximate(false) / EBPF_FILETIME_PER_MS;
return cxplat_query_time_since_boot_approximate(false) * EBPF_NS_PER_FILETIME;
}

static uint64_t
Expand All @@ -2212,7 +2212,7 @@ _ebpf_core_get_time_ms()
{
// cxplat_query_time_since_boot_approximate returns time elapsed since
// boot in units of 100 ns.
return cxplat_query_time_since_boot_approximate(false) * EBPF_NS_PER_FILETIME;
return cxplat_query_time_since_boot_approximate(false) / EBPF_FILETIME_PER_MS;
}

static uint64_t
Expand Down

0 comments on commit b77fd54

Please sign in to comment.