EndGate.TimeSpan

Description: Defines a time interval.

Implements: EndGate.ICloneable

Constructors

TimeSpan (milliseconds)
Creates a new instance of TimeSpan based on the provided milliseconds.

milliseconds: number
Number of milliseconds.

TimeSpan (milliseconds, seconds)
Creates a new instance of TimeSpan based on the provided milliseconds, seconds and minutes.

milliseconds: number
Number of milliseconds.

seconds: number
Number of seconds.

TimeSpan (milliseconds, seconds, minutes)
Creates a new instance of TimeSpan based on the provided milliseconds, seconds and minutes.

milliseconds: number
Number of milliseconds.

seconds: number
Number of seconds.

minutes: number
Number of minutes.

Fields

Milliseconds: number
Gets or sets the number of milliseconds the TimeSpan represents.

Seconds: number
Gets or sets the number of seconds the TimeSpan represents.

Minutes: number
Gets or sets the number of minutes the TimeSpan represents.

(Static) Zero: TimeSpan
Gets a TimeSpan that represents a 0 millisecond time interval.

Methods

Add()
Returns a TimeSpan that represents the addition of the current TimeSpan's milliseconds to the provided TimeSpan's milliseconds.

Multiply()
Returns a TimeSpan that represents the multiplication of the current TimeSpan's milliseconds by the provided TimeSpan's milliseconds.

Subtract()
Returns a TimeSpan that represents the subtraction of the current TimeSpan's milliseconds by the provided TimeSpan's milliseconds.

SubtractFrom()
Returns a TimeSpan that represents the subtraction of the current TimeSpan's milliseconds from the provided TimeSpan's milliseconds.

Divide()
Returns a TimeSpan that represents the division of the current TimeSpan's milliseconds by the provided TimeSpan's milliseconds.

DivideFrom()
Returns a TimeSpan that represents the division of the current TimeSpan's milliseconds from the provided TimeSpan's milliseconds.

Equivalent()
Determines whether this TimeSpan represents the same amount of time as the provided TimeSpan.

Clone()
Returns a TimeSpan that represents the same time interval.

toString()
Overridden toString method to display TimeSpan in the ms:s:m format.

(Static) FromMilliseconds()
Returns a TimeSpan that represents the specified number of milliseconds.

(Static) FromSeconds()
Returns a TimeSpan that represents the specified number of seconds.

(Static) FromMinutes()
Returns a TimeSpan that represents the specified number of minutes.

(Static) DateSpan()
Returns a TimeSpan that represents the time between the two dates.

Examples

There's currently no example available for this page. If you'd like to suggest one send me an containing a description, code, and link to the page for the suggested example. As a thanks I'll associate the code snippet with your name directly below the example if approved.