Path: chuka.playstation.co.uk!news From: Craig Graham Newsgroups: scee.yaroze.beginners Subject: Re: Questions about VSync. Date: Tue, 05 May 1998 17:28:38 +0100 Organization: Intelligent Research Lines: 31 Message-ID: <354F3E36.35930DC0@hinge.mistral.co.uk> References: <354C8851.709D2E83@chowfam.demon.co.uk> <6ij6jd$jpr18@chuka.playstation.co.uk> <354D8AA7.17CA37C6@chowfam.demon.co.uk> <354E298F.2865CC25@netmagic.net> <354E4EA8.A92F3D10@chowfam.demon.co.uk> <6imf4g$jpr23@chuka.playstation.co.uk> NNTP-Posting-Host: 194.131.235.3 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.03 [en] (Win95; I) To be (I hope) definitive: VSync(0); // Wait for next single vertical blank VSync(1); // Don't block, just return number of VSync's VSync(n); // Where n is greater than 1, wait for n vertical blanks.... All values 0>=n return the number of HSync's between successive calls to VSync(); eg. { int h_cnt; VSync(1); // We don't really care about the // return value here, we're just resetting // the hsync counter to get an accurate measure /* *Do some work here * blah blah blah */ h_cnt=VSync(1); // h_cnt is now how long the work took.... } Laters, Craig.