|
-
April 12th, 2010, 04:29 PM
#10
Re: Timer Problem in WPF.....
Rocky, do you want any sort of accuracy with your code?
If you do, then your approach is flawed because you are introducing error each time through the timer loop (i.e. consider that it takes extra time to run the calculations and the system doesn't guarantee the timer will be precisely fired).
Consider using a method that simply uses the timer for UI updates but the actual elapsed time is tracked by a component that uses the system clock. This way, the UI may not be precisely updated but the end time will be very close to what you've specified.
Given this, see if the System.Diagnostic.Stopwatch class can help you.
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
|