chronoman

Classes

Timer

Methods

(static) getRandomValue(start, endopt, bIntegeropt) → {*}

Source:

Generate random number or randomly select item from specified array.

Parameters:
Name Type Attributes Default Description
start Array | number

Array from which an item should be selected or minimal point of interval from which random number should be generated.

end number <optional>
start+1

Maximal point of interval from which random number should be generated.

bInteger boolean <optional>
true

Whether integer number should be returned. This parameter can be used when value of start parameter is a number.

Returns:

Random number when start parameter is a number or randomly selected item when start parameter is an array.

Type
*

Type Definitions

Action()

Source:

Action that should be executed after time period is elapsed.

ActionObject

Source:
Properties:
Name Type Description
execute function

Function that should be executed.

Object describing action that should be executed after time period is elapsed.

Type:
  • Object

ActionSpec

Source:
Properties:
Name Type Attributes Description
context Object <optional>

this for function's call.

func function

Function that should be executed.

Object describing action that should be executed after time period is elapsed.

Type:
  • Object

GetPeriodValue(timeropt) → {module:chronoman~SinglePeriodValue|Array.<module:chronoman~SinglePeriodValue>}

Source:
Parameters:
Name Type Attributes Description
timer module:chronoman~Timer <optional>
Returns:
Type
module:chronoman~SinglePeriodValue | Array.<module:chronoman~SinglePeriodValue>

PeriodValue

Source:

Value determining time period in milliseconds that is used to schedule related action execution.

Type:

RandomPeriod

Source:
Properties:
Name Type Attributes Description
end Integer <optional>

Maximal point of interval from which random time period should be generated.

list Array.<Integer> <optional>

Array from which a time period should be selected randomly.

start Integer <optional>

Minimal point of interval from which random time period should be generated.

Object describing properties for generating random time period.

Type:
  • Object

SinglePeriodValue

Source:

Single value determining time period in milliseconds that is used to schedule related action execution.

Type: