Merge pull request #1218 from AndreyAkinshin/master
[mono.git] / mcs / class / System / System.Diagnostics / Stopwatch.cs
index 4fcd04293bd595a075e7b956ea5f47ac73e24a19..d66e2d4c3207385c4b9ad88a4c63ee5db50284a1 100644 (file)
@@ -113,6 +113,8 @@ namespace System.Diagnostics
                        if (!is_running)
                                return;
                        elapsed += GetTimestamp () - started;
+                       if (elapsed < 0)
+                               elapsed = 0;
                        is_running = false;
                }