Skip to content

Commit 266b94c

Browse files
committed
v2.0.5 添加 WaitingFor() 方法
1 parent 1d8a94b commit 266b94c

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/Senparc.CO2NET/Helpers/DateTimeHelper.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,9 @@ public static long GetUnixDateTime(DateTime dateTime)
148148
/// <returns></returns>
149149
public static async Task WaitingFor(TimeSpan waitingTime, TimeSpan waitingInterval, Action work = null)
150150
{
151+
var startTime = SystemTime.Now;
151152
while (true)
152153
{
153-
var startTime = SystemTime.Now;
154-
155154
work?.Invoke();
156155

157156
var delayTime = Task.Delay(waitingInterval);

src/Senparc.CO2NET/Senparc.CO2NET.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<TargetFrameworks>net451;netstandard2.0;netstandard2.1</TargetFrameworks>
4-
<Version>2.0.5.2</Version>
4+
<Version>2.0.5.3</Version>
55
<LangVersion>8.0</LangVersion>
66
<AssemblyName>Senparc.CO2NET</AssemblyName>
77
<RootNamespace>Senparc.CO2NET</RootNamespace>

0 commit comments

Comments
 (0)