Skip to content

Commit

Permalink
Fixed cross platform issues with Clock
Browse files Browse the repository at this point in the history
  • Loading branch information
leonidumanskiy committed Sep 13, 2023
1 parent c06174e commit b503106
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion source/Fenrir.Multiplayer/Fenrir.Multiplayer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Description>Fenrir Multiplayer Library</Description>
<Version>1.0.12</Version>
<Version>1.0.13</Version>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

Expand Down
8 changes: 4 additions & 4 deletions source/UnityPackage/Assets/Runtime/Utility/Clock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,22 @@ public class Clock
/// <summary>
/// Time in UTC
/// </summary>
public DateTime UtcNow => _startTimeUtc.AddTicks(_stopWatch.ElapsedTicks) + Offset;
public DateTime UtcNow => _startTimeUtc.Add(_stopWatch.Elapsed) + Offset;

/// <summary>
/// Time in UTC without offset
/// </summary>
public DateTime UtcNowRaw => _startTimeUtc.AddTicks(_stopWatch.ElapsedTicks);
public DateTime UtcNowRaw => _startTimeUtc.Add(_stopWatch.Elapsed);

/// <summary>
/// Local time now
/// </summary>
public DateTime Now => _startTime.AddTicks(_stopWatch.ElapsedTicks) + Offset;
public DateTime Now => _startTime.Add(_stopWatch.Elapsed) + Offset;

/// <summary>
/// Local time now
/// </summary>
public DateTime NowRaw => _startTime.AddTicks(_stopWatch.ElapsedTicks);
public DateTime NowRaw => _startTime.Add(_stopWatch.Elapsed);

/// <summary>
/// Starting time
Expand Down

0 comments on commit b503106

Please sign in to comment.