Crate irox_time

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§

datetime
Contains UTCDateTime and associated elements to represent a Date and Time in UTC
epoch
Contains the concept of an Epoch - a specific Proleptic Gregorian Date from which a Timestamp is measured against.
format
Date Formatters
gregorian
Contains Date and associated elements to represent a Proleptic Gregorian Date.
julian
Contains JulianDate and others - ways of measuring a discrete amount of days from a specific Julian Epoch

Structs§

Duration
GreaterThanEqualToValueError
An error type to indicate that the checked value is greater than or equal to the valid reference value
LessThanValue
A Range implementation to verify a value is less than the reference value
Time
Represents a time of the day, an offset into the day from midnight.
Time32
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.
Time64
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.
Time128
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§

DurationUnit
Represents a specific duration unit - SI or otherwise.

Constants§

HOURS_IN_DAY
24 Hours in a Day
MINUTES_IN_DAY
1440 Minutes in a Day
MINUTES_IN_HOUR
60 Minutes in an Hour
NANOS_IN_DAY
Nanoseconds in a Day
NANOS_IN_MICRO
Nanoseconds in a Microsecond
NANOS_IN_MILLI
Nanoseconds in a Millisecond
NANOS_IN_SECOND
Nanoseconds in a Second
SECONDS_IN_DAY
Generally 86400, but occasionally 86401 for leap seconds.
SECONDS_IN_HOUR
3600 Seconds in an Hour
SECONDS_IN_MINUTE
60 Seconds in a Minute

Traits§

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