just an idea, but works on my opengl application as walkaround to driver bug with vsync
1. find your period (p), 25ms in your case
2. save your current time (t0)
3. run your process
4. save your current time (t1)
5. if t1 less than t0+25ms go to step 4. optional, you can sleep before go to step 4 to save power.
6. t0 = t1 - (t1-t0) mod p
7. go to step 3