Jump to content
  • Advertisement
Sign in to follow this  
xsirxx

[.net] timeGetTime() on C# .NET?

This topic is 4231 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ive done some searching and I cant find anything that doesnt link to a non .NET library... So what does C# under .NET(available to port to 360) use for time that is at timeGetTime()'s level or better? Thanks again, Brad

Share this post


Link to post
Share on other sites
Advertisement
The normal high-resolution timer is System.Diagnostics.Stopwatch (also supported in XNA 1.0). System.Environment.TickCount is only accurate to the millisecond; Stopwatch should have much higher accuracy.

On my computer, it has an update frequency of 3,579,545 ticks per second and can return values as close together as 6, for a resolution of about 1.5 microseconds, 500 to 1000 times better than System.Environment.TickCount.

If you're using the XNA framework, why not just use the GameTime object passed into your program's Update function?

[Edited by - nagromo on May 15, 2007 6:19:19 PM]

Share this post


Link to post
Share on other sites
Well im not using XNA right now, but in the future I want to be able to just take the code right over with minimal changes... so im just making sure everything is compatible... thanks alot guys, Ill check out that info.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!