Files
T
kjh2064 c41e5063b7 chore: remove kbx-foundation-v36 reference (superseded by v4 implementation)
Removed entire kbx-foundation-v36 directory as it's been replaced by
the new KBX Foundation v4 patterns implemented in this session:
- Registry-driven screen definitions
- Density-aware UI adapter components
- Feature module templates (ShadowRun, Models)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-08-12 01:39:58 +09:00

20 lines
704 B
C#

namespace Kbx.Shared.Providers;
public sealed class KisRequestPacer
{
private readonly SemaphoreSlim _gate = new(1,1);
private DateTimeOffset _last = DateTimeOffset.MinValue;
public async ValueTask WaitAsync(bool sandbox, CancellationToken ct)
{
await _gate.WaitAsync(ct);
try
{
var spacing = TimeSpan.FromMilliseconds(sandbox ? 1000 : 100); // KBX conservative default; official production max is higher.
var remaining = spacing - (DateTimeOffset.UtcNow - _last);
if (remaining > TimeSpan.Zero) await Task.Delay(remaining, ct);
_last = DateTimeOffset.UtcNow;
}
finally { _gate.Release(); }
}
}