From 848cd3bb6fa4b9b4df0ef5d26c331ddece545b0e Mon Sep 17 00:00:00 2001 From: yitter Date: Fri, 8 Jul 2022 15:58:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E5=BE=AA=E7=8E=AF=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E4=B8=8B=E4=B8=80=E6=97=B6=E9=97=B4=E6=88=B3=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E6=9A=82=E5=81=9C1ms?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- C#.NET/source/Yitter.IdGenerator/Core/SnowWorkerM1.cs | 1 + Java/source/src/main/java/com/github/yitter/core/SnowWorkerM1.java | 1 + 2 files changed, 2 insertions(+) diff --git a/C#.NET/source/Yitter.IdGenerator/Core/SnowWorkerM1.cs b/C#.NET/source/Yitter.IdGenerator/Core/SnowWorkerM1.cs index 4344b5f..5671349 100644 --- a/C#.NET/source/Yitter.IdGenerator/Core/SnowWorkerM1.cs +++ b/C#.NET/source/Yitter.IdGenerator/Core/SnowWorkerM1.cs @@ -351,6 +351,7 @@ namespace Yitter.IdGenerator while (tempTimeTicker <= _LastTimeTick) { + Thread.Sleep(1); tempTimeTicker = GetCurrentTimeTick(); } diff --git a/Java/source/src/main/java/com/github/yitter/core/SnowWorkerM1.java b/Java/source/src/main/java/com/github/yitter/core/SnowWorkerM1.java index 52f6ff4..3e52171 100644 --- a/Java/source/src/main/java/com/github/yitter/core/SnowWorkerM1.java +++ b/Java/source/src/main/java/com/github/yitter/core/SnowWorkerM1.java @@ -214,6 +214,7 @@ public class SnowWorkerM1 implements ISnowWorker { long tempTimeTicker = GetCurrentTimeTick(); while (tempTimeTicker <= _LastTimeTick) { + Thread.sleep(1); tempTimeTicker = GetCurrentTimeTick(); }