Accordingly to https://stackoverflow.com/questions/3523442/difference-between-clock-realtime-and-clock-monotonic,
CLOCK_REALTIME is related to system time and may even jumps backward, while CLOCK_MONOTONIC is related to time passed since boot and cannot go back.
Given this definition, query_performance_counter() is using wrong clock source.
Accordingly to https://stackoverflow.com/questions/3523442/difference-between-clock-realtime-and-clock-monotonic,
CLOCK_REALTIMEis related to system time and may even jumps backward, whileCLOCK_MONOTONICis related to time passed since boot and cannot go back.Given this definition,
query_performance_counter()is using wrong clock source.