>>106913370
thanks to you, I solved it
it wasn't the wait itself, it was the framebuffer swap time that wasn't getting accounted for, it took only 0.1ms but it fucked my FPS over a lot
new code is picrel and it's super accurate, doesn't move more than 0.05FPS from the target
my new problem is that mouse movement is fucked, it's supposed to be fps independent but it's slow at high fps and fast at slow fps, I assume it's because of the tons of mouse events it processes while waiting for the slow fps but I dunno