diff --git a/CryptoExchange.Net/Objects/TimeSyncState.cs b/CryptoExchange.Net/Objects/TimeSyncState.cs
index 74b0b8c..b4caf03 100644
--- a/CryptoExchange.Net/Objects/TimeSyncState.cs
+++ b/CryptoExchange.Net/Objects/TimeSyncState.cs
@@ -10,6 +10,10 @@ namespace CryptoExchange.Net.Objects
///
public class TimeSyncState
{
+ ///
+ /// Name of the API
+ ///
+ public string ApiName { get; set; }
///
/// Semaphore to use for checking the time syncing. Should be shared instance among the API client
///
@@ -26,8 +30,9 @@ namespace CryptoExchange.Net.Objects
///
/// ctor
///
- public TimeSyncState()
+ public TimeSyncState(string apiName)
{
+ ApiName = apiName;
Semaphore = new SemaphoreSlim(1, 1);
}
}
@@ -78,12 +83,12 @@ namespace CryptoExchange.Net.Objects
TimeSyncState.LastSyncTime = DateTime.UtcNow;
if (offset.TotalMilliseconds > 0 && offset.TotalMilliseconds < 500)
{
- Log.Write(LogLevel.Information, $"Time offset within limits, set offset to 0ms");
+ Log.Write(LogLevel.Information, $"{TimeSyncState.ApiName} Time offset within limits, set offset to 0ms");
TimeSyncState.TimeOffset = TimeSpan.Zero;
}
else
{
- Log.Write(LogLevel.Information, $"Time offset set to {Math.Round(offset.TotalMilliseconds)}ms");
+ Log.Write(LogLevel.Information, $"{TimeSyncState.ApiName} Time offset set to {Math.Round(offset.TotalMilliseconds)}ms");
TimeSyncState.TimeOffset = offset;
}
}