nanoFramework.CoreLibrary by nanoFramework project contributors

<PackageReference Include="nanoFramework.CoreLibrary" Version="1.0.0-preview020" />

.NET API 78,848 bytes

 TimeSpan

public struct TimeSpan
Represents a time interval.
public static readonly TimeSpan MaxValue

Represents the maximum TimeSpan value. This field is read-only.

public static readonly TimeSpan MinValue

Represents the minimum TimeSpan value. This field is read-only.

public const long TicksPerDay = 864000000000

Represents the number of ticks in 1 day. This field is constant.

public const long TicksPerHour = 36000000000

Represents the number of ticks in 1 hour. This field is constant.

public const long TicksPerMillisecond = 10000

Represents the number of ticks in 1 millisecond. This field is constant.

public const long TicksPerMinute = 600000000

Represents the number of ticks in 1 minute. This field is constant.

public const long TicksPerSecond = 10000000

Represents the number of ticks in 1 second.

public static readonly TimeSpan Zero

Represents the zero TimeSpan value. This field is read-only.

public int Days { get; }

Gets the days component of the time interval represented by the current TimeSpan structure.

public int Hours { get; }

Gets the hours component of the time interval represented by the current TimeSpan structure.

public int Milliseconds { get; }

Gets the milliseconds component of the time interval represented by the current TimeSpan structure.

public int Minutes { get; }

Gets the minutes component of the time interval represented by the current TimeSpan structure.

public int Seconds { get; }

Gets the seconds component of the time interval represented by the current TimeSpan structure.

public long Ticks { get; }

Gets the number of ticks that represent the value of the current TimeSpan structure.

public TimeSpan(long ticks)

Initializes a new instance of the TimeSpan structure to the specified number of ticks.

public TimeSpan(int hours, int minutes, int seconds)

Initializes a new instance of the TimeSpan structure to a specified number of hours, minutes, and seconds.

public TimeSpan(int days, int hours, int minutes, int seconds)

Initializes a new instance of the TimeSpan structure to a specified number of days, hours, minutes, and seconds.

public TimeSpan(int days, int hours, int minutes, int seconds, int milliseconds)

Initializes a new instance of the TimeSpan structure to a specified number of days, hours, minutes, seconds and milliseconds.

public static int Compare(TimeSpan t1, TimeSpan t2)

Compares two TimeSpan values and returns an integer that indicates whether the first value is shorter than, equal to, or longer than the second value.

public static bool Equals(TimeSpan t1, TimeSpan t2)

Returns a value that indicates whether two specified instances of TimeSpan are equal.

public static TimeSpan FromTicks(long value)

Returns a TimeSpan that represents a specified time, where the specification is in units of ticks.

public static TimeSpan op_Addition(TimeSpan t1, TimeSpan t2)

Adds two specified TimeSpan instances.

public static bool op_Equality(TimeSpan t1, TimeSpan t2)

Indicates whether two TimeSpan instances are equal

public static bool op_GreaterThan(TimeSpan t1, TimeSpan t2)

Indicates whether a specified TimeSpan is greater than another specified TimeSpan.

public static bool op_GreaterThanOrEqual(TimeSpan t1, TimeSpan t2)

Indicates whether a specified TimeSpan is greater than or equal to another specified TimeSpan.

public static bool op_Inequality(TimeSpan t1, TimeSpan t2)

Indicates whether two TimeSpan instances are not equal.

public static bool op_LessThan(TimeSpan t1, TimeSpan t2)

Indicates whether a specified TimeSpan is less than another specified TimeSpan.

public static bool op_LessThanOrEqual(TimeSpan t1, TimeSpan t2)

Indicates whether a specified TimeSpan is less than or equal to another specified TimeSpan.

public static TimeSpan op_Subtraction(TimeSpan t1, TimeSpan t2)

Subtracts a specified TimeSpan from another specified TimeSpan.

Returns a TimeSpan whose value is the negated value of the specified instance.

public static TimeSpan op_UnaryPlus(TimeSpan t)

Returns the specified instance of TimeSpan.

public TimeSpan Add(TimeSpan ts)

Returns a new TimeSpan object whose value is the sum of the specified TimeSpan object and this instance.

public int CompareTo(object value)

Compares this instance to a specified object and returns an integer that indicates whether this instance is shorter than, equal to, or longer than the specified object.

public TimeSpan Duration()

Returns a new TimeSpan object whose value is the absolute value of the current TimeSpan object.

public TimeSpan Negate()

Returns a new TimeSpan object whose value is the negated value of this instance.

Returns a new TimeSpan object whose value is the difference between the specified TimeSpan object and this instance.