Files
jellyfin-plugin-danmu/Jellyfin.Plugin.Danmu/Vendor/RateLimiter/TimeSystem.cs
2023-02-02 21:55:54 +08:00

31 lines
593 B
C#
Vendored

using System;
using System.Threading;
using System.Threading.Tasks;
namespace RateLimiter
{
internal class TimeSystem : ITime
{
public static ITime StandardTime { get; }
static TimeSystem()
{
StandardTime = new TimeSystem();
}
private TimeSystem()
{
}
DateTime ITime.GetNow()
{
return DateTime.Now;
}
Task ITime.GetDelay(TimeSpan timespan, CancellationToken cancellationToken)
{
return Task.Delay(timespan, cancellationToken);
}
}
}