Use DateTime.UtcNow not DateTime.Now in test
authorAndi McClure <andi.mcclure@xamarin.com>
Wed, 23 Nov 2016 21:22:11 +0000 (16:22 -0500)
committerAndi McClure <andi.mcclure@xamarin.com>
Wed, 23 Nov 2016 21:22:11 +0000 (16:22 -0500)
mono/tests/sgen-new-threads-collect.cs

index 4c6aee3764ab4d362dcf1ce25261ff4369174643..c5d5e4aa26adab5eb928aa7a58f1bdfb5a015c89 100644 (file)
@@ -7,7 +7,7 @@ class Driver
 {
        static DateTime targetTime;
        static bool finished() {
-               DateTime now = DateTime.Now;
+               DateTime now = DateTime.UtcNow;
                return now > targetTime;
        }
 
@@ -15,7 +15,7 @@ class Driver
        {
                int gcCount = 0;
                int joinCount = 0;
-               targetTime = DateTime.Now.AddSeconds(30);
+               targetTime = DateTime.UtcNow.AddSeconds(30);
 
                Thread gcThread = new Thread (() => {
                        while (!finished()) {