1
2
3
4
5
6
7
8
9
10
11
12
// Copyright 2019-2024 ChainSafe Systems
// SPDX-License-Identifier: Apache-2.0, MIT

pub trait Clock<Tz: chrono::TimeZone> {
    fn now() -> chrono::DateTime<Tz>;
}

impl Clock<chrono::Utc> for chrono::Utc {
    fn now() -> chrono::DateTime<Self> {
        chrono::Utc::now()
    }
}