This commit is contained in:
parent
5ec2881f01
commit
ffcab9592e
@ -61,16 +61,15 @@ pub trait CheckTimerCreator {
|
|||||||
#[cfg(feature = "std")]
|
#[cfg(feature = "std")]
|
||||||
pub struct StdCheckTimer {
|
pub struct StdCheckTimer {
|
||||||
expiry_time_seconds: u64,
|
expiry_time_seconds: u64,
|
||||||
start_time: std::time::Instant
|
start_time: std::time::Instant,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#[cfg(feature = "std")]
|
#[cfg(feature = "std")]
|
||||||
impl StdCheckTimer {
|
impl StdCheckTimer {
|
||||||
pub fn new(expiry_time_seconds: u64) -> Self {
|
pub fn new(expiry_time_seconds: u64) -> Self {
|
||||||
Self {
|
Self {
|
||||||
expiry_time_seconds,
|
expiry_time_seconds,
|
||||||
start_time: std::time::Instant::now()
|
start_time: std::time::Instant::now(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,11 +6,9 @@ pub struct SourceHandler {
|
|||||||
|
|
||||||
impl SourceHandler {
|
impl SourceHandler {
|
||||||
pub fn new(id: impl Into<UnsignedByteField>) -> Self {
|
pub fn new(id: impl Into<UnsignedByteField>) -> Self {
|
||||||
Self { id }
|
Self { id: id.into() }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {}
|
||||||
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user