sealed
class
TimeSpan
A length of time measured in datetime units.
public
TimeSpan
.
Constructor
(
days
=0,
hours
=0,
minutes
=0,
seconds
=0)
public
DatePrecisions
TimeSpan
.
Precision
The amount of precision in the date
public
double
TimeSpan
.
Second
Returns the seconds as a real number
public
int
TimeSpan
.
Ticks
Returns the number of 100 nanoseconds in the time
public
TimeSpan
TimeSpan
.
WithPrecision
(
DatePrecisions
precision
)
A new object at the specified precision
public
double
TimeSpan
.
Years
Returns the total years in the interval
public
double
TimeSpan
.
Days
Returns the total days in the interval
public
double
TimeSpan
.
Hours
Returns the total hours in the interval
public
double
TimeSpan
.
Minutes
Returns the total minutes in the interval
public
double
TimeSpan
.
Seconds
Returns the total seconds in the interval
public
readonly
int
TimeSpan
.
Day
The Day member
public
readonly
int
TimeSpan
.
Hour
The Hour member
public
readonly
int
TimeSpan
.
Minute
The Minute member
public
double
TimeSpan
.
TotalSeconds
The time expressed in whole and fractional seconds
public
virtual
object
.
GetLayoutTip
Return a layout for the hint popup
public
virtual
object
.
GetLayoutSpan
Return a layout inside a span
public
virtual
object
.
GetLayoutBlock
Return a layout inside a block
public
virtual
object
.
GetSourceReference
Return a source reference for this object
public
virtual
void
object
.
GetTexSource
(
source
)
LaTeX source code for this object
public
virtual
Icon
object
.
GetIcon
Return a icon for this object
public
virtual
int
object
.
Compare
(
value
)
Compares this object with another and returns (-1, 0, or 1)
Example
=
Block
{
var
past
=
#2021-03-18 12:30:14#
;
var
span
=
DateTime
.
Now
-
past
;
Paragraph
{
"The elapsed time between "
;
past
;
" and now is : "
;
span
.
Day
;
" days, "
;
span
.
Hour
;
" hours, "
;
span
.
Minute
;
" minutes and "
;
span
.
Second
;
" seconds "
;
};
"This is a total of "
span
.
TotalSeconds
" seconds."
;
};
The elapsed time between 2021-03-18 12:30:14 and now is : 2007 days, 20 hours, 8 minutes and 48.2882325
seconds
This is a total of 173477328.2882325 seconds.