fix(core): Fixes date time uses by using stop watch (#549)
- [X] Replaces measurements with stop watch - [X] Some cleanup
This commit is contained in:
parent
6c4308bce6
commit
76970325a3
3 changed files with 17 additions and 13 deletions
|
|
@ -97,15 +97,15 @@ namespace Server
|
|||
|
||||
if (_profileStart > 0)
|
||||
{
|
||||
_profileTime += TickCount - _profileStart;
|
||||
_profileTime += Stopwatch.GetTimestamp() - _profileStart;
|
||||
}
|
||||
|
||||
_profileStart = _profiling ? TickCount : 0;
|
||||
_profileStart = _profiling ? Stopwatch.GetTimestamp() : 0;
|
||||
}
|
||||
}
|
||||
|
||||
public static TimeSpan ProfileTime =>
|
||||
TimeSpan.FromMilliseconds(_profileStart > 0 ? _profileTime + (TickCount - _profileStart) : _profileTime);
|
||||
TimeSpan.FromTicks(_profileStart > 0 ? _profileTime + (Stopwatch.GetTimestamp() - _profileStart) : _profileTime);
|
||||
|
||||
public static Assembly Assembly { get; set; }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue