stratus/eth/primitives/unix_time_now.rs
1use display_json::DebugAsJson;
2
3use crate::eth::primitives::UnixTime;
4
5/// [`UnixTime`] that automatically sets the current time when created.
6#[derive(DebugAsJson, Clone, PartialEq, Eq, derive_more::Deref, fake::Dummy, serde::Serialize, serde::Deserialize)]
7pub struct UnixTimeNow(#[deref] UnixTime);
8
9impl Default for UnixTimeNow {
10 fn default() -> Self {
11 Self(UnixTime::now())
12 }
13}