mirror of
https://github.com/status-im/codex-contracts-eth.git
synced 2025-01-31 02:35:36 +00:00
15 lines
376 B
Solidity
15 lines
376 B
Solidity
|
// SPDX-License-Identifier: MIT
|
||
|
pragma solidity 0.8.28;
|
||
|
|
||
|
type Timestamp is uint64;
|
||
|
|
||
|
library Timestamps {
|
||
|
function isAfter(Timestamp a, Timestamp b) internal pure returns (bool) {
|
||
|
return Timestamp.unwrap(a) > Timestamp.unwrap(b);
|
||
|
}
|
||
|
|
||
|
function isFuture(Timestamp timestamp) internal view returns (bool) {
|
||
|
return Timestamp.unwrap(timestamp) > block.timestamp;
|
||
|
}
|
||
|
}
|