TimersTimestampImplUpgradeable.sol 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // SPDX-License-Identifier: MIT
  2. pragma solidity ^0.8.0;
  3. import "../utils/TimersUpgradeable.sol";
  4. import "../proxy/utils/Initializable.sol";
  5. contract TimersTimestampImplUpgradeable is Initializable {
  6. function __TimersTimestampImpl_init() internal onlyInitializing {
  7. __TimersTimestampImpl_init_unchained();
  8. }
  9. function __TimersTimestampImpl_init_unchained() internal onlyInitializing {
  10. }
  11. using TimersUpgradeable for TimersUpgradeable.Timestamp;
  12. TimersUpgradeable.Timestamp private _timer;
  13. function getDeadline() public view returns (uint64) {
  14. return _timer.getDeadline();
  15. }
  16. function setDeadline(uint64 timestamp) public {
  17. _timer.setDeadline(timestamp);
  18. }
  19. function reset() public {
  20. _timer.reset();
  21. }
  22. function isUnset() public view returns (bool) {
  23. return _timer.isUnset();
  24. }
  25. function isStarted() public view returns (bool) {
  26. return _timer.isStarted();
  27. }
  28. function isPending() public view returns (bool) {
  29. return _timer.isPending();
  30. }
  31. function isExpired() public view returns (bool) {
  32. return _timer.isExpired();
  33. }
  34. uint256[49] private __gap;
  35. }