Shared utilities, error types, and common data structures for FX trading platform. Provides foundational types, error handling, and helper functions used across all trading services.
//! Time utilities for high-precision timestamps
usechrono::{DateTime, Utc};usestd::time::{SystemTime,UNIX_EPOCH};/// Get current timestamp in nanoseconds since epoch
pubfnnow_nanos()->u64{SystemTime::now().duration_since(UNIX_EPOCH).expect("Time went backwards").as_nanos()asu64}/// Get current timestamp in microseconds since epoch
pubfnnow_micros()->u64{SystemTime::now().duration_since(UNIX_EPOCH).expect("Time went backwards").as_micros()asu64}/// Get current UTC datetime
pubfnnow_utc()->DateTime<Utc>{Utc::now()}