[Mono-bugs] [Bug 469907] Stopwatch.Elapsed overflow

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Jan 28 07:43:00 EST 2009


https://bugzilla.novell.com/show_bug.cgi?id=469907

User jan.siroky at rcware.eu added comment
https://bugzilla.novell.com/show_bug.cgi?id=469907#c4





--- Comment #4 from Jan Sirroky <jan.siroky at rcware.eu>  2009-01-28 05:43:00 MST ---
"in practice" - you are right that it doesn't happen in practice, but from this
point of view you can remove division and remove all the if (IsHighResolution)
conditions and write just:

get
 {
  return TimeSpan.FromTicks(ElapsedTicks);
 }

because in practice 10 000 000 / 10 000 000 is always 1 and IsHighResolution is
always true

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list