class TimeSpan extends AnyRef
Represents a time interval.
- Alphabetic
- By Inheritance
- TimeSpan
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
TimeSpan(days: Int, hours: Int, minutes: Int, seconds: Int, milliseconds: Int)
Initializes a new instance of the TimeSpan class to a specified number of days, hours, minutes, seconds, and milliseconds.
Initializes a new instance of the TimeSpan class to a specified number of days, hours, minutes, seconds, and milliseconds.
- days
Number of days.
- hours
Number of hours.
- minutes
Number of minutes.
- seconds
Number of seconds.
- milliseconds
Number of milliseconds.
-
new
TimeSpan(days: Int, hours: Int, minutes: Int, seconds: Int)
Initializes a new instance of the TimeSpan class to a specified number of days, hours, minutes, and seconds.
Initializes a new instance of the TimeSpan class to a specified number of days, hours, minutes, and seconds.
- days
Number of days.
- hours
Number of hours.
- minutes
Number of minutes.
- seconds
Number of seconds.
-
new
TimeSpan(hours: Int, minutes: Int, seconds: Int)
Initializes a new instance of the TimeSpan class to a specified number of hours, minutes, and seconds.
Initializes a new instance of the TimeSpan class to a specified number of hours, minutes, and seconds.
- hours
Number of hours.
- minutes
Number of minutes.
- seconds
Number of seconds.
-
new
TimeSpan(ticks: Long)
Initializes a new instance of the TimeSpan class to the specified number of ticks.
Initializes a new instance of the TimeSpan class to the specified number of ticks.
- ticks
A time period expressed in 100-nanosecond units.
-
new
TimeSpan()
Creates an instance of Timespan.
- new TimeSpan(internalTimeSpan: NCTimeSpan)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
Add(ts: TimeSpan): TimeSpan
Returns a new TimeSpan object whose value is the sum of the specified TimeSpan object and this instance.
Returns a new TimeSpan object whose value is the sum of the specified TimeSpan object and this instance.
- ts
The time interval to add.
- returns
A new object that represents the value of this instance plus the value of ts.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
getDays: Int
Gets the days component of the time interval represented by the current TimeSpan class.
Gets the days component of the time interval represented by the current TimeSpan class.
- returns
The day component of this instance. The return value can be positive or negative.
-
def
getHours: Int
Gets the hours component of the time interval represented by the current TimeSpan class.
Gets the hours component of the time interval represented by the current TimeSpan class.
- returns
The hour component of the current TimeSpan class. The return value anges from -23 through 23.
-
def
getMilliseconds: Int
Gets the milliseconds component of the time interval represented by the current TimeSpan class.
Gets the milliseconds component of the time interval represented by the current TimeSpan class.
- returns
The millisecond component of the current TimeSpan class. The return value ranges from -999 through 999.
-
def
getMinutes: Int
Gets the minutes component of the time interval represented by the current TimeSpan class.
Gets the minutes component of the time interval represented by the current TimeSpan class.
- returns
The minute component of the current TimeSpan class. The return value ranges from -59 through 59.
-
def
getSeconds: Int
Gets the seconds component of the time interval represented by the current TimeSpan class.
Gets the seconds component of the time interval represented by the current TimeSpan class.
- returns
The second component of the current TimeSpan class. The return value ranges from -59 through 59.
-
def
getTotalDays: Double
Gets the value of the current TimeSpan class expressed in whole and fractional days.
Gets the value of the current TimeSpan class expressed in whole and fractional days.
- returns
The total number of days represented by this instance.
-
def
getTotalHours: Double
Gets the value of the current TimeSpan class expressed in whole and fractional hours.
Gets the value of the current TimeSpan class expressed in whole and fractional hours.
- returns
The total number of hours represented by this instance.
-
def
getTotalMilliseconds: Double
Gets the value of the current TimeSpan class expressed in whole and fractional milliseconds.
Gets the value of the current TimeSpan class expressed in whole and fractional milliseconds.
- returns
The total number of milliseconds represented by this instance.
-
def
getTotalMinutes: Double
Gets the value of the current TimeSpan class expressed in whole and fractional milliseconds.
Gets the value of the current TimeSpan class expressed in whole and fractional milliseconds.
- returns
The total number of minutes represented by this instance.
-
def
getTotalSeconds: Double
Gets the value of the current TimeSpan class expressed in whole and fractional milliseconds.
Gets the value of the current TimeSpan class expressed in whole and fractional milliseconds.
- returns
The total number of seconds represented by this instance.
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated