Timed
Functions
constructor
function constructor(
uint256 _duration
) internal
Parameters
Name | Type | Description |
---|---|---|
_duration | uint256 |
isTimeEnded
function isTimeEnded() public returns (bool)
return true if time period has ended
remainingTime
function remainingTime() public returns (uint256)
number of seconds remaining until time is up
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | remaining |
timeSinceStart
function timeSinceStart() public returns (uint256)
number of seconds since contract was initialized
will be less than or equal to duration
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | timestamp |
isTimeStarted
function isTimeStarted() public returns (bool)
_initTimed
function _initTimed() internal
_setDuration
function _setDuration(
uint256 newDuration
) internal
Parameters
Name | Type | Description |
---|---|---|
newDuration | uint256 |
Events
DurationUpdate
event DurationUpdate(
uint256 oldDuration,
uint256 newDuration
)
Parameters
Name | Type | Description |
---|---|---|
oldDuration | uint256 | |
newDuration | uint256 |
TimerReset
event TimerReset(
uint256 startTime
)
Parameters
Name | Type | Description |
---|---|---|
startTime | uint256 |