Home Reference Source

Function

Static Private Summary
private

formatTime(seconds: number, guide: number, displayMilliseconds: boolean): string

Format seconds as a duration string.

private

log(args: Array, logType: string, debug: boolean)

Log message (if the debug option is enabled).

Static Private

private formatTime(seconds: number, guide: number, displayMilliseconds: boolean): string source

Format seconds as a duration string.

Either formatted as:

  • DD:HH:MM:SS (> 24 hours)
  • HH:MM:SS (> 1 hour)
  • MM:SS:MSS (displayMilliseconds = true)
  • MM:SS (displayMilliseconds = false)

Supplying a guide (in seconds) will force a number of leading zeros to cover the length of the guide.

Params:

NameTypeAttributeDescription
seconds number

Number of seconds to be turned into a string.

guide number

Number (in seconds) to model the string after.

displayMilliseconds boolean

Display milliseconds or not.

Return:

string

Formatted duration time, e.g '00:12:653'.

private log(args: Array, logType: string, debug: boolean) source

Log message (if the debug option is enabled).

Params:

NameTypeAttributeDescription
args Array

The arguments to be passed to the matching console method.

logType string

The name of the console method to use.

debug boolean

Whether or not the debug option is enabled or not.