TimersBlockNumberImpl.sol 846 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. // SPDX-License-Identifier: MIT
  2. pragma solidity ^0.8.0;
  3. import "../utils/Timers.sol";
  4. contract TimersBlockNumberImpl {
  5. using Timers for Timers.BlockNumber;
  6. Timers.BlockNumber private _timer;
  7. function getDeadline() public view returns (uint64) {
  8. return _timer.getDeadline();
  9. }
  10. function setDeadline(uint64 timestamp) public {
  11. _timer.setDeadline(timestamp);
  12. }
  13. function reset() public {
  14. _timer.reset();
  15. }
  16. function isUnset() public view returns (bool) {
  17. return _timer.isUnset();
  18. }
  19. function isStarted() public view returns (bool) {
  20. return _timer.isStarted();
  21. }
  22. function isPending() public view returns (bool) {
  23. return _timer.isPending();
  24. }
  25. function isExpired() public view returns (bool) {
  26. return _timer.isExpired();
  27. }
  28. }