Alas, I don't think UEFI exposes vblank/hblank interrupts so you'd just have to YOLO the timing.