Advertisement
WarPie90

Untitled

Mar 9th, 2017
479
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.44 KB | None | 0 0
  1.     //st is set to now + 60ms,
  2.     // Mental note: imagine GetTickCount64 is 100
  3.     st := GetTickCount64() + 60;  
  4.  
  5.     //if this isn't call.. then 0ms has been wasited
  6.     if Assigned(@self.onMoveEvent) then self.onMoveEvent(@self, pos);
  7.    
  8.     // we subtract "st" from "now"..  
  9.     // GetTickCount64 is still 100 because MoveEvent was ran. So the result is 160-100, which gives a wait of 60ms
  10.     Wait( Max(1, st-GetTickCount64()) );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement