feat: cleanup

This commit is contained in:
tiennm99 committed 2026-02-27 10:30:21 +07:00
1 parent 8ec41ab1d2
commit 77f45bd23c
6 files changed
+20 -32

No files matched your search

@@ -15,7 +15,6 @@ namespace TimeMocker.Hook
public struct MockTimeInfo
{
public long DeltaTicks; // Offset to add to DateTime.UtcNow.Ticks (can be negative)
public int Enabled; // 1 = mock active, 0 = passthrough
}
// -------------------------------------------------------------------------
@@ -108,12 +107,8 @@ namespace TimeMocker.Hook
private DateTime GetFakeUtc()
{
var info = ReadMockInfo();
if (info.Enabled == 1)
{
// Return real UTC time plus the stored delta offset
return new DateTime(DateTime.UtcNow.Ticks + info.DeltaTicks, DateTimeKind.Utc);
}
return DateTime.UtcNow;
// Return real UTC time plus the stored delta offset
return new DateTime(DateTime.UtcNow.Ticks + info.DeltaTicks, DateTimeKind.Utc);
}
private void InstallHooks()