TimeSpan()

TimeSpan::TimeSpan() constructor

Constructs a TimeSpan object that represents a zero time interval.

constexpr System::TimeSpan::TimeSpan()

TimeSpan::TimeSpan(int64_t) constructor

Constructs an instance of TimeSpan class that represents the specified time interval.

constexpr System::TimeSpan::TimeSpan(int64_t ticks)

Arguments

ParameterTypeDescription
ticksint64_tThe time interval to be represented by the instance being constructed expressed as the number of 100-nanoseconds intervals.

TimeSpan::TimeSpan(int, int, int) constructor

Constructs an instance of TimeSpan class that represents the time interval which is equal to the sum of the specified number of hours, minutes and seconds.

System::TimeSpan::TimeSpan(int hours, int minutes, int seconds)

Arguments

ParameterTypeDescription
hoursintThe number of hours in the hours component of the time interval to be represented by the instance being constructed
minutesintThe number of minutes in the minutes component of the time interval to be represented by the instance being constructed
secondsintThe number of seconds in the seconds component of the time interval to be represented by the instance being constructed

TimeSpan::TimeSpan(int, int, int, int, int) constructor

Constructs an instance of TimeSpan class that represents the time interval which is equal to the sum of the specified number of hours, minutes, seconds and milliseconds.

System::TimeSpan::TimeSpan(int days, int hours, int minutes, int seconds, int milliseconds=0)

Arguments

ParameterTypeDescription
daysintThe number of days in the days component of the time interval to be represented by the instance being constructed
hoursintThe number of hours in the hours component of the time interval to be represented by the instance being constructed
minutesintThe number of minutes in the minutes component of the time interval to be represented by the instance being constructed
secondsintThe number of seconds in the seconds component of the time interval to be represented by the instance being constructed
millisecondsintThe number of milliseconds in the milliseconds component of the time interval to be represented by the instance being constructed

TimeSpan::TimeSpan(const TimeSpan&) constructor

Constructs a TimeSpan object that represents the time interval equal to the time interval represented by the specified TimeSpan object.

constexpr System::TimeSpan::TimeSpan(const TimeSpan &)=default

See Also