mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Trigger an HTMLMetadata download not more than once an hour (per URL).
This commit is contained in:
@@ -16,6 +16,10 @@ public extension Date {
|
||||
return addingTimeInterval(0.0 - TimeInterval(days: days))
|
||||
}
|
||||
|
||||
func bySubtracting(hours: Int) -> Date {
|
||||
return addingTimeInterval(0.0 - TimeInterval(hours: hours))
|
||||
}
|
||||
|
||||
func byAdding(days: Int) -> Date {
|
||||
return addingTimeInterval(TimeInterval(days: days))
|
||||
}
|
||||
@@ -26,4 +30,8 @@ public extension TimeInterval {
|
||||
init(days: Int) {
|
||||
self.init(days * 24 * 60 * 60)
|
||||
}
|
||||
|
||||
init(hours: Int) {
|
||||
self.init(hours * 60 * 60)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user