Skip to main content

Crate use_event_timestamp

Crate use_event_timestamp 

Source
Expand description

§use-event-timestamp

SystemTime timestamp wrapper for RustUse event primitives.

§Install

[dependencies]
use-event-timestamp = "0.1.0"

§Example

use std::time::SystemTime;
use use_event_timestamp::EventTimestamp;

let timestamp = EventTimestamp::from_system_time(SystemTime::UNIX_EPOCH);

assert_eq!(timestamp.as_system_time(), SystemTime::UNIX_EPOCH);

§Scope

  • Wrap std::time::SystemTime for event envelopes.
  • Provide now, from_system_time, and as_system_time helpers.
  • Keep time policy in the caller’s application.

§Non-Goals

  • No chrono or time dependency.
  • No clock abstraction.
  • No formatting, timezone, or parsing behavior.

§Status

Experimental v0.1.0 primitive.

§License

Licensed under either of the following, at your option:

  • Apache License, Version 2.0
  • MIT license

Structs§

EventTimestamp