Click or drag to resize

Time Structure

Represents a discrete interval of time.
Inheritance Hierarchy
SystemObject
  SystemValueType
    InnerDrive.QuantitativeTime

Namespace: InnerDrive.Quantitative
Assembly: InnerDrive.Quantitative (in InnerDrive.Quantitative.dll) Version: 5.0.8475.0
Syntax
C#
[SerializableAttribute]
[JsonObjectAttribute(ItemTypeNameHandling = TypeNameHandling.Auto)]
public struct Time : IAdditionOperators<Time, Time, Time>, 
	IAdditionOperators<Time, double, Time>, IAdditionOperators<Time, int, Time>, 
	ICloneable, IComparable, IComparable<Time>, IComparisonOperators<Time, Time, bool>, 
	IEqualityOperators<Time, Time, bool>, IComparisonOperators<Time, double, bool>, 
	IEqualityOperators<Time, double, bool>, IConvertible<Time>, 
	IDivisionOperators<Time, double, Time>, IDivisionOperators<Time, int, Time>, 
	IEquatable<Time>, IMeasurable, IFormattable, IMinMaxValue<Time>, 
	IMultiplyOperators<Time, double, Time>, IMultiplyOperators<Time, int, Time>, 
	ISubtractionOperators<Time, Time, Time>, ISubtractionOperators<Time, double, Time>, 
	ISubtractionOperators<Time, int, Time>, IUnaryNegationOperators<Time, Time>, 
	ISpanFormattable

The Time type exposes the following members.

Constructors
 NameDescription
Public methodTime(Double) Creates a new instance of Time with a particular value.
Public methodTime(TimeSpan) Creates a new instance of Time from a TimeSpan.
Public methodTime(Double, Type) Creates a new instance of Time with a particular value and Unit whose Type is specified
Public methodCode exampleTime(Double, Unit, MetricExponent) Creates a new instance of Time with a particular value and Unit.
Top
Properties
 NameDescription
Public propertyAccuracy Represents the degree confidence that the quantity represented equals the quantity actually measured, controlling how the CompareTo<T> method behaves.
Public propertyDefaultUnit Gets the Type of the Unit in which the IMeasurableclass is denominated.
Public propertyStatic memberMaxValueGets the maximum value of the current type.
Public propertyStatic memberMinValueGets the minimum value of the current type.
Public propertyName Gets the name of the type of measurement.
Public propertyPrecision Represents the range within which the measurement is correct, controlling how the ToString() method behaves.
Public propertyUnit Gets the Unit in which the IMeasurable object is denominated.
Public propertyValue Gets or sets the quantity of units represented by the IMeasurable object.
Top
Methods
 NameDescription
Public methodStatic memberAdd(Time, Time) Adds two instances of Time together.
Public methodStatic memberAdd(Time, Double) Adds an instance of Time to an instance of Double.
Public methodCloneCreates a new object that is a copy of the current instance.
Public methodCompareToCompares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
Public methodConvertTo(Type) Converts the instance into a new IMeasurable instance denominated in the measurement units provided.
Public methodConvertTo(Unit) Converts the instance into a new instance of the same type denominated in the measurement units provided.
Public methodStatic memberDivide Divides an instance of Time by a double-precision value.
Public methodEquals(Object)Indicates whether this instance and a specified object are equal.
(Overrides ValueTypeEquals(Object))
Public methodEquals(Time)Indicates whether the current object is equal to another object of the same type.
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetHashCodeReturns the hash code for this instance.
(Overrides ValueTypeGetHashCode)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodStatic memberIsInfinity Returns a value indicating whether the specified number evaluates to negative or positive infinity.
Public methodStatic memberIsNaN Returns a value indicating whether the specified number evaluates to a value that is not a number (NaN).
Public methodStatic memberIsNegativeInfinity Returns a value indicating whether the specified number evaluates to negative infinity (NegativeInfinity).
Public methodStatic memberIsPositiveInfinity Returns a value indicating whether the specified number evaluates to positive infinity (PositiveInfinity).
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodStatic memberMultiply Multiplies an instance of Time by a double-precision value.
Public methodStatic memberNegate Negates the value of the specified Time operand.
Public methodStatic memberSubtract(Time, Time) Subtracts one instance of Time from another.
Public methodStatic memberSubtract(Time, Double) Subtracts an instance of Double from an instance of Time.
Public methodToStringReturns the fully qualified type name of this instance.
(Overrides ValueTypeToString)
Public methodToString(MetricExponent) Converts the numeric value of this instance to its equivalent String representation, using the metric exponent provided if appropriate to the Unit type.
Public methodToString(String) Converts the numeric value of this instance to its equivalent String representation, using the specified format.
Public methodToString(String, MetricExponent) Converts the numeric value of this instance to its equivalent String representation, using the specified format and metric exponent.
Public methodToString(String, IFormatProvider)Formats the value of the current instance using the specified format.
Public methodToString(String, MetricExponent, IFormatProvider) Formats the value of the current instance using the specified format.
Public methodTryFormatTries to format the value of the current instance into the provided span of characters.
Top
Operators
 NameDescription
Public operatorStatic memberAddition(Time, Time)Adds two values together to compute their sum.
Public operatorStatic memberAddition(Time, Double)Adds two values together to compute their sum.
Public operatorStatic memberAddition(Time, Int32)Adds two values together to compute their sum.
Public operatorStatic memberDivision(Time, Double)Divides one value by another to compute their quotient.
Public operatorStatic memberDivision(Time, Int32)Divides one value by another to compute their quotient.
Public operatorStatic memberEquality(Double, Time) Compares an instance of Time with an instance of Double for equality.
Public operatorStatic memberEquality(Time, Time)Compares two values to determine equality.
Public operatorStatic memberEquality(Time, Double)Compares two values to determine equality.
Public operatorStatic memberGreaterThan(Double, Time) Compares an instance of Time to an instance of Double for different values.
Public operatorStatic memberGreaterThan(Time, Time)Compares two values to determine which is greater.
Public operatorStatic memberGreaterThan(Time, Double)Compares two values to determine which is greater.
Public operatorStatic memberGreaterThanOrEqual(Double, Time) Compares an instance of Time to an instance of Double for different values.
Public operatorStatic memberGreaterThanOrEqual(Time, Time)Compares two values to determine which is greater or equal.
Public operatorStatic memberGreaterThanOrEqual(Time, Double)Compares two values to determine which is greater or equal.
Public operatorStatic member(Double to Time) Creates a new Time object from a Double value.
Public operatorStatic member(Time to Double) Creates a new Double value from a given Time object.
Public operatorStatic memberInequality(Double, Time) Compares an instance of Time with an instance of Double for inequality.
Public operatorStatic memberInequality(Time, Time)Compares two values to determine inequality.
Public operatorStatic memberInequality(Time, Double)Compares two values to determine inequality.
Public operatorStatic memberLessThan(Double, Time) Compares an instance of Time to an instance of Double for different values.
Public operatorStatic memberLessThan(Time, Time)Compares two values to determine which is less.
Public operatorStatic memberLessThan(Time, Double)Compares two values to determine which is less.
Public operatorStatic memberLessThanOrEqual(Double, Time) Compares an instance of Time to an instance of Double for different values.
Public operatorStatic memberLessThanOrEqual(Time, Time)Compares two values to determine which is less or equal.
Public operatorStatic memberLessThanOrEqual(Time, Double)Compares two values to determine which is less or equal.
Public operatorStatic memberMultiply(Time, Double)Multiplies two values together to compute their product.
Public operatorStatic memberMultiply(Time, Int32)Multiplies two values together to compute their product.
Public operatorStatic memberSubtraction(Time, Time)Subtracts two values to compute their difference.
Public operatorStatic memberSubtraction(Time, Double)Subtracts two values to compute their difference.
Public operatorStatic memberSubtraction(Time, Int32)Subtracts two values to compute their difference.
Public operatorStatic memberUnaryNegation(Time)Computes the unary negation of a value.
Top
Fields
 NameDescription
Public fieldStatic memberEpsilon Represents the smallest value of Accuracy that will successfully evaluate equality without boundary condition errors.
Public fieldStatic memberMaxPrecision Represents the maximum precision with which a value can be displayed.
Public fieldStatic memberMinPrecision Represents the minimum precision with which a value can be displayed.
Top
Explicit Interface Implementations
 NameDescription
Explicit interface implementationPrivate methodIComparableCompareToCompares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
Top
Remarks
This class differs from the TimeSpan in that its primary purpose is to represent human-readable intervals of time in discrete chunks. For example, while the TimeSpan is concerned with the passage of time between two events, the Time class is concerned with what to call that interval.
See Also