dualsense_tools/
timestamped.rs1use std::time::Instant;
2
3#[derive(Clone, Copy, Debug)]
4pub struct Timestamped<A> {
5 pub value: A,
6 pub timestamp: Instant,
7}
8
9impl<A> Timestamped<A> {
10 pub fn new(value: A) -> Timestamped<A> {
11 Timestamped {
12 value,
13 timestamp: Instant::now(),
14 }
15 }
16}