@@ -13,31 +13,31 @@ def initialize(timers, handle)
1313 @handle = handle
1414 end
1515
16- # @returns [Numeric] The time remaining until the timeout occurs.
16+ # @returns [Numeric] The time remaining until the timeout occurs, in seconds .
1717 def duration
1818 @handle . time - @timers . now
1919 end
2020
21- # Update the duration of the timeout, rescheduling it if necessary .
21+ # Update the duration of the timeout.
2222 #
2323 # The duration is relative to the current time, e.g. setting the duration to 5 means the timeout will occur in 5 seconds from now.
2424 #
25- # @parameter value [Numeric] The new duration to assign to the timeout.
25+ # @parameter value [Numeric] The new duration to assign to the timeout, in seconds .
2626 def duration = ( value )
2727 self . reschedule ( @timers . now + value )
2828 end
2929
30- # Adjust the timeout by the specified duration, rescheduling it if necessary .
30+ # Adjust the timeout by the specified duration.
3131 #
3232 # The duration is relative to the timeout time, e.g. adjusting the timeout by 5 increases the current duration by 5 seconds.
3333 #
34- # @parameter duration [Numeric] The duration to adjust the timeout by.
34+ # @parameter duration [Numeric] The duration to adjust the timeout by, in seconds .
3535 # @returns [Numeric] The new time at which the timeout will occur.
3636 def adjust ( duration )
3737 self . reschedule ( time + duration )
3838 end
3939
40- # @returns [Numeric] The time at which the timeout will occur.
40+ # @returns [Numeric] The time at which the timeout will occur, in seconds since {now} .
4141 def time
4242 @handle . time
4343 end
@@ -55,7 +55,7 @@ def now
5555 @timers . now
5656 end
5757
58- # Cancel the timeout.
58+ # Cancel the timeout, preventing it from executing .
5959 def cancel!
6060 @handle . cancel!
6161 end
0 commit comments