From ca47896204482bf4a6979e3838bf7f09f61cebeb Mon Sep 17 00:00:00 2001
From: giy <giy@omp-system.ru>
Date: Fri, 02 Sep 2022 14:16:56 +0300
Subject: [PATCH] Обновление до версии 2.9.0

---
 QtVsTools.Package/Common/Timestamp.cs |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/QtVsTools.Package/Common/Timestamp.cs b/QtVsTools.Package/Common/Timestamp.cs
index deaf18a..cf3155e 100644
--- a/QtVsTools.Package/Common/Timestamp.cs
+++ b/QtVsTools.Package/Common/Timestamp.cs
@@ -30,8 +30,12 @@
 
 namespace QtVsTools
 {
+    using Common;
+
     public class Timestamp : Concurrent<Timestamp>
     {
+        static LazyFactory StaticLazy { get; } = new LazyFactory();
+
         long LastTimestamp { get; set; }
         long GetStrictMonotonicTimestamp()
         {
@@ -43,9 +47,8 @@
             }
         }
 
-        static Timestamp _Instance;
-        static Timestamp Instance =>
-            StaticThreadSafeInit(() => _Instance, () => _Instance = new Timestamp());
+        static Timestamp Instance => StaticLazy.Get(() =>
+            Instance, () => new Timestamp());
 
         public static long Next()
         {

--
Gitblit v1.9.1