Make snippet in README nicer to read (🤷♀️)
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)") }
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
Timestamped ⏱
A generic type to decorate a given value with timestamp information.