项目作者: mokagio
项目描述 :
Generic decorator for timestamp information.
高级语言: Swift
项目地址: git://github.com/mokagio/Timestamped.git
Timestamped ⏱
A generic type to decorate a given value with timestamp information.
let resource: Timestamped<Resource> = getResource()
if resource.createdBefore(Date.yesterady) {
print("Old resource. Needs refresh")
} else {
print("Still fresh: resource is \(resource.value)")
}