Implement deferred core utility parity APIs/tests and refresh tracking artifacts
This commit is contained in:
@@ -25,6 +25,18 @@ public static class AccessTimeService
|
||||
// Mirror Go's init(): nothing to pre-allocate in .NET.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Explicit init hook for Go parity.
|
||||
/// Mirrors package <c>init()</c> in server/ats/ats.go.
|
||||
/// This method is intentionally idempotent.
|
||||
/// </summary>
|
||||
public static void Init()
|
||||
{
|
||||
// Ensure a non-zero cached timestamp is present.
|
||||
var now = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() * 1_000_000L;
|
||||
Interlocked.CompareExchange(ref _utime, now, 0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Registers a user. Starts the background timer when the first registrant calls this.
|
||||
/// Each call to <see cref="Register"/> must be paired with a call to <see cref="Unregister"/>.
|
||||
|
||||
Reference in New Issue
Block a user