Skip to content

Commit ab7eb04

Browse files
author
arch
committed
improve performance
1 parent ef0594f commit ab7eb04

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Entrypoint.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public static int StartTimecodeServer(string debugLogFile)
2121

2222
private static async Task RunTimecodeServer(string debugLogFile)
2323
{
24-
const int UPDATE_LOOP_TIME_IN_MILLLISECONDS = 25;
24+
const int UPDATE_LOOP_TIME_IN_MILLLISECONDS = 50;
2525
var virtualDesktopPlaybackSettings = VirtualDesktopPlaybackSettings.Instance;
2626
//var virtualDesktopUiSettings = VirtualDesktopUiSettings.Instance;
2727
var timecodeServer = VirtualDesktopTimecodeServer.Instance;
@@ -43,4 +43,4 @@ private static async Task RunTimecodeServer(string debugLogFile)
4343
await Task.CompletedTask;
4444
}
4545
}
46-
}
46+
}

VirtualDesktopTimecodeServer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ private void AcceptConnection()
5858
_server.BeginAcceptTcpClient(HandleConnection, _server);
5959
}
6060

61-
private void HandleConnection(IAsyncResult result)
61+
private async void HandleConnection(IAsyncResult result)
6262
{
6363
try
6464
{
@@ -70,7 +70,7 @@ private void HandleConnection(IAsyncResult result)
7070

7171
while (true)
7272
{
73-
Task.Delay(TimeSpan.FromMilliseconds(_serverLoopTimeInMilliseconds));
73+
await Task.Delay(TimeSpan.FromMilliseconds(_serverLoopTimeInMilliseconds));
7474

7575
if (_videoPath != lastVideoFile)
7676
{

0 commit comments

Comments
 (0)