Archive for June 12th, 2008
c# timing functions
by brian on Jun.12, 2008, under .NET, c#, coding
Here are some timing functions that come in the .Net framework. I’ve used these for moderately accurate timing code — at least down to the millisecond level. For any timing less than about 30 milliseconds these work much better than timer events piled on each other which tend to get inaccurate.
int begin = System.Environment.TickCount ... do something int end = System.Environment.TickCount int elapsed = end - begin;
