Skip to content

Commit

Permalink
switch from Duration to TimeDelta (#221)
Browse files Browse the repository at this point in the history
Co-authored-by: gwbres <guillaume.bressaix@gmail.com>
  • Loading branch information
larsnaesbye and gwbres authored Mar 25, 2024
1 parent f909207 commit d481068
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rinex-cli/src/teqc/ascii_plot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pub fn ascii_plot (x_width: u32, obs_rinex: &Rinex, nav_rinex: Option<Rinex>) ->
epochs.sort();
let time_span = epochs[epochs.len()-1].date - epochs[0].date;
let px_secs = time_span.num_seconds() as u32 / x_width; // nb of secs per px
let dt_granularity = chrono::Duration::from_std(std::time::Duration::from_secs(px_secs.into())).unwrap();
let dt_granularity = chrono::TimeDelta::from_std(std::time::Duration::from_secs(px_secs.into())).unwrap();

// list vehicles, on an epoch basis
let mut vehicles = obs_rinex.space_vehicles();
Expand Down
2 changes: 1 addition & 1 deletion sinex/src/bias/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ impl std::str::FromStr for Solution {

impl Solution {
/// Returns duration for this bias solution
pub fn duration(&self) -> chrono::Duration {
pub fn duration(&self) -> chrono::TimeDelta {
self.end_time - self.start_time
}
}
Expand Down

0 comments on commit d481068

Please sign in to comment.