Struct Hours
Represents a duration in hours which is represented in memory like an std::chrono::hours from the C++
standard library. MSVC uses duration<int, ratio<3600>>, so the layout is a single 32-bit int.
public readonly struct Hours
- Inherited Members
Constructors
Hours(int)
Initializes a new instance of the Hours struct.
public Hours(int value)
Parameters
valueintThe duration value in hours.
Methods
AsTimeSpan()
Converts this duration to a TimeSpan.
public TimeSpan AsTimeSpan()
Returns
ToString()
public override string ToString()
Returns
Operators
implicit operator TimeSpan(Hours)
public static implicit operator TimeSpan(Hours hours)
Parameters
hoursHoursThe value to convert.
Returns
implicit operator Hours(TimeSpan)
public static implicit operator Hours(TimeSpan timeSpan)
Parameters
timeSpanTimeSpanThe time span to convert.