4 ms·
LD_PRELOAD is bit yucky though in my opinion. I suppose ptrace is the only other option though :/
by zokier 2y ago
LD_PRELOAD is bit yucky though in my opinion. I suppose ptrace is the only other option though :/
- deivid 2y agoIt's not the only other option! It's not less yucky, but you can creatively stomp on the vDSO functions which back the time-related functions (gettimeofday, clock_gettime, time); I've written about it at [0] and have a "library" (more like a proof of concept) at [1]. [0]: https://blog.davidv.dev/posts/cursing-a-process-vdso-for-time-hacking/ https://blog.davidv.dev/posts/cursing-a-process-vdso-for-tim... [1]: https://github.com/DavidVentura/tpom https://github.com/DavidVentura/tpom