Stopwatch for silverlight?
问题 There is no StopWatch for Silverlight. What would you use instead of it? I saw some posts about people saying to create an empty animation and call GetCurrentTime() from the Storyboard class, I couldn't get it to work... What would you do? 回答1: This is what I did. Its simple and worked very well for me: long before = DateTime.Now.Ticks; DoTheTaskThatNeedsMeasurement(); long after = DateTime.Now.Ticks; TimeSpan elapsedTime = new TimeSpan(after - before); MessageBox.Show(string.Format("Task