Struct DiscreteTimeInterval
Structure representing a time interval.
Syntax
public struct DiscreteTimeInterval : IEquatable<DiscreteTimeInterval>, IFormattable
Constructors
DiscreteTimeInterval(DiscreteTime, DiscreteTime)
Constructor that takes two time values to create an interval.
Declaration
public DiscreteTimeInterval(DiscreteTime time0, DiscreteTime time1)
Parameters
Fields
End
The ending time of the interval
Declaration
public readonly DiscreteTime End
Field Value
MaxRange
The largest representable time interval, contains an invalid duration (due to overflow)
Declaration
public static readonly DiscreteTimeInterval MaxRange
Field Value
Start
The starting time of the interval
Declaration
public readonly DiscreteTime Start
Field Value
Properties
Duration
The duration of the interval
Declaration
public DiscreteTime Duration { get; }
Property Value
DurationAsTick
The duration of the interval, expressed as a unsigned long
Declaration
public ulong DurationAsTick { get; }
Property Value
Methods
Clamp(DiscreteTime)
Declaration
public DiscreteTime Clamp(DiscreteTime time)
Parameters
Returns
Contains(DiscreteTime)
Returns true only if a given time value is inside the interval.
Declaration
public bool Contains(DiscreteTime t)
Parameters
Returns
Equals(Object)
Returns true if the time is equal to a given time, false otherwise.
Declaration
public override bool Equals(object o)
Parameters
Type |
Name |
Description |
Object |
o |
|
Returns
Overrides
Equals(DiscreteTimeInterval)
Returns true if the same range is represented.
Declaration
public bool Equals(DiscreteTimeInterval other)
Parameters
Returns
GetHashCode()
Returns a hash code for the time.
Declaration
public override int GetHashCode()
Returns
Overrides
Overlaps(DiscreteTimeInterval)
Returns true only if another interval overlaps.
Declaration
public bool Overlaps(DiscreteTimeInterval other)
Parameters
Returns
ToString()
Returns a string representation of the time.
Declaration
public override string ToString()
Returns
Overrides
Returns a string representation of the time using a specified format and culture-specific format information.
Declaration
public string ToString(string format, IFormatProvider formatProvider)
Parameters
Returns