Skip to content

Commit

Permalink
Slightly correct the starting time (#101)
Browse files Browse the repository at this point in the history
The previous start time was set as soon as the program discovered a running instance of Titanfall 2. However, this could lead to incorrect play times. Instead, the true start time is fetched from the process itself.
  • Loading branch information
IncPlusPlus committed Sep 15, 2021
1 parent ed11514 commit 7a3b422
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion titanfall2-rp/ProcessNetApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static bool Init()
Log.Debug("Found '" + ProcessName + "'" + "!");
var proc = processSearch[0];
_sharp = new ProcessSharp(proc, MemoryType.Remote);
StartTimestamp = DateTimeOffset.Now.UtcDateTime;
StartTimestamp = _sharp.Native.StartTime.ToUniversalTime();
return true;
}

Expand Down

0 comments on commit 7a3b422

Please sign in to comment.