- Netduino Forums
- → Viewing Profile: Posts: Don
The Netduino forums have been replaced by new forums at community.wildernesslabs.co.
This site has been preserved for archival purposes only
and the ability to make new accounts or posts has been turned off.
Community Stats
- Group Members
- Active Posts 2
- Profile Views 7208
- Member Title New Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Not Telling
0
Neutral
User Tools
Friends
Don hasn't added any friends yet.
Posts I've Made
In Topic: System.Diagnostics.Stopwatch class
13 December 2010 - 06:06 PM
Does DateTime.Now and GetMachineTime both use the same underlying time mechanism (tick count I presume)? I did a test with DateTime.Now and it drifted about .4 seconds over an hour. Didn't test GetMachineTime directly but I'm guessing it is the same. I need a bit more accuracy for my application. I was thinking about adding some Real Time Clock (RTC) component and interface it to the Netduino... but I'm not familiar with specific RTC's or how they work. The downside of this is that I really liked how the InteruptPorts took a snapshot of the time and includes it in the event because it accounts for delay int he event queueing in .NET code. I guess I could write some driver level or system code in c++ to modify the interupt to use an RTC component. Could I also use an RTC component (or manual calibration) to just figure out a factor to adjust thee standard time facilities by a fixed percentage> Should the rate at which the clock is fast or slow stay consistant under most conditions (temp, battery conditions, etc)? If so then maybe I can just do a calibration factor and hide it in a wrapper DateTime class. Maybe an extension method to DateTime like DateTime.Adjusted() or DateTime.Calibrated()... which returns an adjusted DateTime from the system ones.
thanks
Don
In Topic: System.Diagnostics.Stopwatch class
08 December 2010 - 09:32 PM
How accurate is time you get back from GetMachineTime on the Netduino? What is the precision and how much drift whould it have over time? I'm wondering if it could be used for timing in sporting events down to the 100th of a second over a 15-20 minute event?
Also does the time that is passed in from an InteruptPort event in sync with the GetMachineTime call. I'd like to use program logic to start a timer and then a interupt driven event to stop the timing. I'm assuming they use the same timer source.
Many thanks!
- Netduino Forums
- → Viewing Profile: Posts: Don
- Privacy Policy