- Source:
Classes
Methods
-
<static> getRandomValue(start [, end] [, bInteger])
-
Generate random number or randomly select item from specified array.
Parameters:
Name Type Argument Default Description startArray | number Array from which an item should be selected or minimal point of interval from which random number should be generated.
endnumber <optional>
start+1 Maximal point of interval from which random number should be generated.
bIntegerboolean <optional>
true Whether integer number should be returned. This parameter can be used when value of
startparameter is a number.- Source:
Returns:
Random number when
startparameter is a number or randomly selected item whenstartparameter is an array.- Type
- *
Type Definitions
-
Action()
-
Action that should be executed after time period is elapsed.
- Source:
-
ActionObject
-
Object describing action that should be executed after time period is elapsed.
Type:
- Object
- Source:
Properties:
Name Type Description executefunction Function that should be executed.
-
ActionSpec
-
Object describing action that should be executed after time period is elapsed.
Type:
- Object
- Source:
Properties:
Name Type Argument Description contextObject <optional>
thisfor function's call.funcfunction Function that should be executed.
-
GetPeriodValue( [timer])
-
Parameters:
Name Type Argument Description timermodule:chronoman~Timer <optional>
- Source:
Returns:
-
PeriodValue
-
Value determining time period in milliseconds that is used to schedule related action execution.
Type:
- module:chronoman~SinglePeriodValue | Array.<module:chronoman~SinglePeriodValue> | module:chronoman~GetPeriodValue
- Source:
-
RandomPeriod
-
Object describing properties for generating random time period.
Type:
- Object
- Source:
Properties:
Name Type Argument Description endInteger <optional>
Maximal point of interval from which random time period should be generated.
listArray.<Integer> <optional>
Array from which a time period should be selected randomly.
startInteger <optional>
Minimal point of interval from which random time period should be generated.
-
SinglePeriodValue
-
Single value determining time period in milliseconds that is used to schedule related action execution.
Type:
- Integer | module:chronoman~RandomPeriod
- Source: