|
-
Oct 21st, 2016, 10:09 AM
#1
Thread Starter
Member
MicroTimer, Resource Friendly Accurate Timer
So I was working on a parallel game a while back and had the need for an accurate timer as .Net doesn't provide one out of the 3 usual timer classes. I originally started out using a typical loop and polled the stopwatch but that was way too resource intensive. I eventually found the multimedia timer and it was accurate to the millisecond but games that ran at 60fps for example has each frame every 16.67 milliseconds and the multimedia timer simply cant achieve that. I then combined the 2 to get what is now my MicroTimer. It is accurate as the loop/poll (or close as can be to it), but resource friendly like a typical timer (unless you are going to high rates, in which case it will eat cpu like the loop/poll).
Source: http://www.vbforums.com/showthread.p...=1#post5151717
If anyone has any suggestions or improvements, please share. Thanks.
Last edited by TizzyT; Mar 22nd, 2017 at 09:22 PM.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|