mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
core: use static methods for TimeSpan
This commit is contained in:
@@ -752,6 +752,6 @@ namespace Jackett.Common.Indexers
|
||||
|
||||
// TODO: remove this implementation and use gloal cache
|
||||
protected static List<CachedQueryResult> cache = new List<CachedQueryResult>();
|
||||
protected static readonly TimeSpan cacheTime = new TimeSpan(0, 9, 0);
|
||||
protected static readonly TimeSpan cacheTime = TimeSpan.FromMinutes(9);
|
||||
}
|
||||
}
|
||||
|
@@ -62,7 +62,7 @@ namespace Jackett.Common.Services
|
||||
var delayHours = 1; // first check after 1 hour (for users not running jackett 24/7)
|
||||
while (true)
|
||||
{
|
||||
locker.WaitOne((int)new TimeSpan(delayHours, 0, 0).TotalMilliseconds);
|
||||
locker.WaitOne((int)TimeSpan.FromHours(delayHours).TotalMilliseconds);
|
||||
locker.Reset();
|
||||
await CheckForUpdates();
|
||||
delayHours = 24; // following checks only once/24 hours
|
||||
|
Reference in New Issue
Block a user