I've just seen this question, where one of the answers indicates that System.Diagnostics.Stopwatch should only be used for diagnosing performance and not in production code.
In that case, what would be the best way to get precision timing in .NET. I'm currently in the early stages of building a very simple MIDI sequencer using the MIDI-out functionality of NAudio. I'd like to be able to send MIDI messages out aligned to (say) 1/10s with as little jitter as possible. Is this feasible, or will things like context-switching ruin my day?
I currently have some code in a console app that continuously calls Stopwatch and calculates the jitter when generating a stream of 1/16th-notes at 150bpm. The jitter is very low in this situation, however I'll be moving this off to another thread, so I dont know if that will remain the case.