Add bpf_ktime_get_ns helper function without IR gen

This commit is contained in:
2025-09-07 20:58:54 +05:30
parent 3b5425ca1b
commit d87decd25e
4 changed files with 12 additions and 4 deletions

View File

@ -1,6 +1,6 @@
from pythonbpf.decorators import bpf, section
from ctypes import c_void_p, c_int64, c_int32
from pythonbpf.helpers import bpf_ktime_get_ns
@bpf
@section("tracepoint/syscalls/sys_enter_execve")
@ -11,8 +11,9 @@ def hello(ctx: c_void_p) -> c_int32:
@bpf
@section("tracepoint/syscalls/sys_exit_execve")
def hello_again(ctx: c_void_p) -> c_int32:
def hello_again(ctx: c_void_p) -> c_int64:
print("exited")
return c_int32(0)
ts = bpf_ktime_get_ns()
return c_int64(0)
LICENSE = "GPL"