Crate irox_time

Source
Expand description

§Module Structure

  • crate - Contains the base Time struct, describing a standard Hours/minutes/seconds framework.
  • datetime - Contains UTCDateTime structs, describing a Date with a Time
  • epoch - Contains Epoch, UnixEpoch, GPSEpoch, and others, providing the datum anchor for timestamps UnixTimestamp, GPSTimestamp, etc.
  • gregorian - Contains Date and Month, that describe a gregorian calendar date.
  • julian - Contains JulianDate and it’s associated epochs.
  • crate::format - Contains Format and FormatParser to tranlate dates to and from strings.

The top level module Contains the various representations of Time

A Time is a specific time offset into a Day. Intended for use where Hour:Minute:Seconds are needed.

The following are variants of epoch::Timestamp, with specific methods and sizes to to represent the Duration against an Epoch. These follow the same binary format as the NTP Timestamp format, if used with the NTP Epoch.

  • A Time32 is a Q16.16 Timestamp where Seconds and Fractional Seconds are u16’s
  • A Time64 is a Q32.32 Timestamp where Seconds and Fractional Seconds are u32’s
  • A Time128 is a Q64.64 Timestamp where Seconds and Fractional Seconds are u64’s

Modules§

Structs§

  • An error type to indicate that the checked value is greater than or equal to the valid reference value
  • A Range implementation to verify a value is less than the reference value
  • Represents a time of the day, an offset into the day from midnight.
  • 32 Bit Fixed Precision Time Format, storing 16 bits of Seconds, and 16 bits of Fractional Seconds. This is the equivalent of Q16.16, and is semantically equivalent to the NTP Short Format if using the epoch::NTP_EPOCH.
  • 64 Bit Fixed Precision Time Format, storing 32 bits of Seconds, and 32 bits of Fractional Seconds. This is the equivalent of Q32.32, and is semantically equivalent to the NTP Timestamp Format if using the epoch::NTP_EPOCH.
  • 128 Bit Fixed Precision Time Format, storing 64 bits of Seconds, and 64 bits of Fractional Seconds. This is the equivalent of Q64.64, and is semantically equivalent to the NTP Datestamp Format if using the epoch::NTP_EPOCH.

Enums§

  • Represents a specific duration unit - SI or otherwise.

Constants§

Traits§

  • A trait to check if a particular value is within range