Change type of chrono return to be auto
Co-authored-by: Maurice Heumann <MauriceHeumann@gmail.com>
simplify conditional compile and add #else to prevent clang-tidy breaking CI
Co-authored-by: Maurice Heumann <MauriceHeumann@gmail.com>
fix intrinsics, and resolve x86 compiler issues
- fix `time.hpp` compiler warnings (errors) and use proper intrinsic for gcc
- simplify tick calculation logic
- fix: exclude intrinsics include for non x86 builds and fix style
- fix: get() on clock_ unique ptr
Previously, RDTSC in the VM always returned a constant value, which broke any non deterministic timing-based operations, or caused detections in heuristics of malware and ANTI-VM tools.
This patch introduces a spoofed rdtsc_fake counter that tracks and adjusts timing deltas to simulate realistic TSC increments. Can be extended to simulate rdtsc timings based on CPU clock speed.