Skip to main content

Timed

Volt Protocol

an abstract contract for timed events

Methods

duration

function duration() external view returns (uint256)

the duration of the timed period

Returns

NameTypeDescription
_0uint256undefined

isTimeEnded

function isTimeEnded() external view returns (bool)

return true if time period has ended

Returns

NameTypeDescription
_0boolundefined

isTimeStarted

function isTimeStarted() external view returns (bool)

Returns

NameTypeDescription
_0boolundefined

remainingTime

function remainingTime() external view returns (uint256)

number of seconds remaining until time is up

Returns

NameTypeDescription
_0uint256remaining

startTime

function startTime() external view returns (uint256)

the start timestamp of the timed period

Returns

NameTypeDescription
_0uint256undefined

timeSinceStart

function timeSinceStart() external view returns (uint256)

number of seconds since contract was initialized

will be less than or equal to duration

Returns

NameTypeDescription
_0uint256timestamp

Events

DurationUpdate

event DurationUpdate(uint256 oldDuration, uint256 newDuration)

Parameters

NameTypeDescription
oldDurationuint256undefined
newDurationuint256undefined

TimerReset

event TimerReset(uint256 startTime)

Parameters

NameTypeDescription
startTimeuint256undefined