implemented vertical Sync for windows platform