use regular UnixTimestamp ctor
All checks were successful
Rust/spacepackets/pipeline/head This commit looks good
All checks were successful
Rust/spacepackets/pipeline/head This commit looks good
This commit is contained in:
parent
8cf6f72cf3
commit
16bd0f0956
@ -223,10 +223,10 @@ pub trait CcsdsTimeProvider {
|
|||||||
fn unix_seconds(&self) -> i64;
|
fn unix_seconds(&self) -> i64;
|
||||||
fn subsecond_millis(&self) -> Option<u16>;
|
fn subsecond_millis(&self) -> Option<u16>;
|
||||||
fn unix_stamp(&self) -> UnixTimestamp {
|
fn unix_stamp(&self) -> UnixTimestamp {
|
||||||
UnixTimestamp {
|
if self.subsecond_millis().is_none() {
|
||||||
unix_seconds: self.unix_seconds(),
|
return UnixTimestamp::new_only_seconds(self.unix_seconds());
|
||||||
subsecond_millis: self.subsecond_millis(),
|
|
||||||
}
|
}
|
||||||
|
UnixTimestamp::const_new(self.unix_seconds(), self.subsecond_millis().unwrap())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn date_time(&self) -> Option<DateTime<Utc>>;
|
fn date_time(&self) -> Option<DateTime<Utc>>;
|
||||||
|
Loading…
Reference in New Issue
Block a user