use NativeCall; sub the-time(Int() $it = time) { # coerce to Int, current time default sub ctime(int64 is rw --> Str) is native {*}; # the actual interface my int $time = $it; # the rest is syntactic sugar, really. ctime($time) }; # the actual call into the C-library } say the-time; # Sun Jul 15 17:05:34 2018