Module: chronoman

Author:
  • Denis Sikuler
Source:

Classes

Timer

Methods


<static> getRandomValue(start [, end] [, bInteger])

Generate random number or randomly select item from specified array.

Parameters:
Name Type Argument 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.

Source:
Returns:

Random number when start parameter is a number or randomly selected item when start parameter 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
Properties:
Name Type Description
execute function

Function that should be executed.

Source:

ActionSpec

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

Type:
  • Object
Properties:
Name Type Argument Description
context Object <optional>

this for function's call.

func function

Function that should be executed.

Source:

GetPeriodValue( [timer])

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

PeriodValue

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

Type:
Source:

RandomPeriod

Object describing properties for generating random time period.

Type:
  • Object
Properties:
Name Type Argument 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.

Source:

SinglePeriodValue

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

Type:
Source: