I have trouble with finding the floating point system time from midnight in C#. I need it for animation and therefor it would be useless to have it rounded to whole seconds and restarting every minute like in a calendar time. The timer object can't be used because it only wait at least the specified delay and drift away if the system is busy. In VB6 you write Timer to get it. In VB.net you write VB.Timer() after importing Microsoft.VisualBasic to VB. How do I get the same thing in C# so that my SDK samples can be consistent between multiple languages?
If you just need a high-resolution timer, you can use the Stopwatch class. If you really want the amount of time since midnight (or some other specific time) then you'll probably need to use DateTime.Ticks and convert to floating point yourself.
Wouldn't it be better to use the QueryPerformanceFrequency (if on Windows) which has a precision of the system GHZ clock (3GHZ PC will give have a 3 billion ticks per second precision)?
If you are in the .Net framework, there is very little difference between languages since they compile to the same thing. Just google c# timer, or .Net timer.
TotalSeconds from stopwatch worked well.