Skip to content

Commit e2e24ac

Browse files
authored
Fix the timer period (#159)
1 parent e658d37 commit e2e24ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/NuttyTree.NetDaemon.Application/ElectronicsTime/gRPC/ElectronicsTimeGrpcService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public override async Task GetStatus(StatusRequest request, IServerStreamWriter<
6868
while (!context.CancellationToken.IsCancellationRequested)
6969
{
7070
// We have to recreate the timer each time because the time to next daytime change can vary based on Daylight Saving Time
71-
using var daytimeChange = new Timer(_ => updateStatusTrigger.TrySetResult(), null, GetTimeToNextDaytimeChange(), TimeSpan.MaxValue);
71+
using var daytimeChange = new Timer(_ => updateStatusTrigger.TrySetResult(), null, GetTimeToNextDaytimeChange(), TimeSpan.FromDays(1));
7272

7373
var response = new StatusResponse
7474
{

0 commit comments

Comments
 (0)