Add the TimeSpan given to this TimeSpan returning a new TimeSpan.
Subtract the specified TimeSpan from this TimeSpan.
Scale the TimeSpan by the specified amount. This should not be used to convert to a different unit. Use the unit accessors instead. This should only be used as a scaling mechanism. For example, if you have a timeout and you want to sleep for twice the timeout, you would use timeout * 2.
Divide the TimeSpan by the specified amount. This should not be used to convert to a different unit. Use the unit accessors instead. This should only be used as a scaling mechanism. For example, if you have a timeout and you want to sleep for half the timeout, you would use timeout / 2.
Perform integer division with the given time span.
Compares this object against another TimeSpan value.
Determines whether two TimeSpan values are equal
Add the specified TimeSpan to this TimeSpan, assigning the result to this instance.
Subtract the specified TimeSpan from this TimeSpan and assign the
Scales this TimeSpan and assigns the result to this instance.
Divides this TimeSpan and assigns the result to this instance.
Negate a time span
Convert to days
Convert to hours
Convert to a floating point interval representing seconds.
Convert to microseconds
Convert to milliseconds
Convert to minutes
Convert to nanoseconds
Convert to seconds
Get the number of ticks that this timespan represents. This can be used to construct another TimeSpan:
Convert to TimeOfDay
Construct a TimeSpan from the given number of days
Construct a TimeSpan from the given number of hours
Construct a TimeSpan from the given interval. The interval represents seconds as a double. This allows both whole and fractional seconds to be passed in.
Construct a TimeSpan from the given number of microseconds
Construct a TimeSpan from the given number of milliseconds
Construct a TimeSpan from the given number of minutes
Construct a TimeSpan from the given number of nanoseconds
Construct a TimeSpan from the given number of seconds
This struct represents a length of time. The underlying representation is in units of 100ns. This allows the length of time to span to roughly +/- 10000 years.
Notably missing from this is a representation of weeks, months and years. This is because weeks, months, and years vary according to local calendars. Use tango.time.chrono.* to deal with these concepts.
Note: nobody should change this struct without really good reason as it is required to be a part of some interfaces. It should be treated as a builtin type. Also note that there is deliberately no opCall constructor here, since it tends to produce too much overhead. If you wish to build a TimeSpan struct from a ticks value, use D's builtin ability to create a struct with given member values (See the description of ticks() for an example of how to do this).