TimeSpan
Tip
This is a builtin dotnet type. The documentation and api interface are generated from dotnet source files.
Represents a time interval.
Fields:
Days number
Gets the days component of the time interval represented by the current TimeSpan structure.
Hours number
Gets the hours component of the time interval represented by the current TimeSpan structure.
Microseconds number
Gets the microseconds component of the time interval represented by the current TimeSpan structure.
Milliseconds number
Gets the milliseconds component of the time interval represented by the current TimeSpan structure.
Minutes number
Gets the minutes component of the time interval represented by the current TimeSpan structure.
Nanoseconds number
Gets the nanoseconds component of the time interval represented by the current TimeSpan structure.
NanosecondsPerTick number
Represents the number of nanoseconds per tick. This field is constant.
Seconds number
Gets the seconds component of the time interval represented by the current TimeSpan structure.
Ticks number
Gets the number of ticks that represent the value of the current TimeSpan structure.
TicksPerDay number
Represents the number of ticks in 1 day. This field is constant.
TicksPerHour number
Represents the number of ticks in 1 hour. This field is constant.
TicksPerMicrosecond number
Represents the number of ticks in 1 microsecond. This field is constant.
TicksPerMillisecond number
Represents the number of ticks in 1 millisecond. This field is constant.
TicksPerMinute number
Represents the number of ticks in 1 minute. This field is constant.
TicksPerSecond number
Represents the number of ticks in 1 second.
TotalDays number
Gets the value of the current TimeSpan structure expressed in whole and fractional days.
TotalHours number
Gets the value of the current TimeSpan structure expressed in whole and fractional hours.
TotalMicroseconds number
Gets the value of the current TimeSpan structure expressed in whole and fractional microseconds.
TotalMilliseconds number
Gets the value of the current TimeSpan structure expressed in whole and fractional milliseconds.
TotalMinutes number
Gets the value of the current TimeSpan structure expressed in whole and fractional minutes.
TotalNanoseconds number
Gets the value of the current TimeSpan structure expressed in whole and fractional nanoseconds.
TotalSeconds number
Gets the value of the current TimeSpan structure expressed in whole and fractional seconds.
Constructors:
New(ticks: number) :
Initializes a new instance of the TimeSpan structure to the specified number of ticks.
Name | Type | Default | Summary |
ticks | number | A time period expressed in 100-nanosecond units. |
New(hours: number, minutes: number, seconds: number) :
Initializes a new instance of the TimeSpan structure to a specified number of hours, minutes, and seconds.
Name | Type | Default | Summary |
hours | number | Number of hours. | |
minutes | number | Number of minutes. | |
seconds | number | Number of seconds. |
New(days: number, hours: number, minutes: number, seconds: number) :
Initializes a new instance of the TimeSpan structure to a specified number of days, hours, minutes, and seconds.
Name | Type | Default | Summary |
days | number | Number of days. | |
hours | number | Number of hours. | |
minutes | number | Number of minutes. | |
seconds | number | Number of seconds. |
New(days: number, hours: number, minutes: number, seconds: number, milliseconds: number) :
Initializes a new instance of the TimeSpan structure to a specified number of days, hours, minutes, seconds, and milliseconds.
Name | Type | Default | Summary |
days | number | Number of days. | |
hours | number | Number of hours. | |
minutes | number | Number of minutes. | |
seconds | number | Number of seconds. | |
milliseconds | number | Number of milliseconds. |
New(days: number, hours: number, minutes: number, seconds: number, milliseconds: number, microseconds: number) :
Initializes a new instance of the TimeSpan structure to a specified number of days, hours, minutes, seconds, milliseconds, and microseconds.
Name | Type | Default | Summary |
days | number | Number of days. | |
hours | number | Number of hours. | |
minutes | number | Number of minutes. | |
seconds | number | Number of seconds. | |
milliseconds | number | Number of milliseconds. | |
microseconds | number | Number of microseconds. |