Module time

Module time 

Source
Expand description

Time utilities for telemetry timestamping.

This module provides time-related functionality for telemetry data collection. It abstracts over different time sources depending on the platform and feature configuration.

ยงPlatform Support

  • std: Uses system time with high precision
  • freertos: Uses FreeRTOS time utilities
  • no_std: Uses monotonic time sources

ยงTimestamp Format

All timestamps are represented as nanoseconds since an epoch. The specific epoch depends on the platform and configuration:

  • With system_time feature: Unix epoch (1970-01-01 00:00:00 UTC)
  • Without system_time feature: Arbitrary system start time

Structsยง

Duration ๐Ÿ”’
Duration represents a span of time.
Exceeded ๐Ÿ”’
A TimeAbstraction::timeout_at reached the deadline before the future resolved.
Instant ๐Ÿ”’
An Instant in time. Instants should be always increasing and are generally obtainable through the operating system time driver.
Time ๐Ÿ”’
Implements the TimeAbstraction trait for standard Rust.
Timestamp
A timestamp with nanosecond resolution.

Enumsยง

SystemTimeError ๐Ÿ”’
An error that may happen while working with System Time.

Traitsยง

Interval ๐Ÿ”’
A stream of periodic ticks, created by TimeAbstraction::interval.
SystemTime ๐Ÿ”’
Provides a measurement of the system time.
SystemTimeSync ๐Ÿ”’
Allows manual synchronization of SystemTime.
TimeAbstraction ๐Ÿ”’
TimeAbstraction is used to perform time-related operations in a platform-agnostic manner.

Functionsยง

now ๐Ÿ”’