Refactor datafile path handling
This commit is contained in:
@@ -152,11 +152,27 @@ pub enum TimeRange {
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct Nanos {
|
||||
pub ns: u64,
|
||||
}
|
||||
|
||||
#[derive(Clone, Serialize, Deserialize)]
|
||||
pub struct NanoRange {
|
||||
pub beg: u64,
|
||||
pub end: u64,
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for NanoRange {
|
||||
fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||
write!(
|
||||
fmt,
|
||||
"NanoRange {{ beg: {} s, end: {} s }}",
|
||||
self.beg / SEC,
|
||||
self.end / SEC
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl NanoRange {
|
||||
pub fn delta(&self) -> u64 {
|
||||
self.end - self.beg
|
||||
|
||||
Reference in New Issue
Block a user