tangled
alpha
login
or
join now
sachy.dev
/
striker
0
fork
atom
Bevy+Ratutui powered Monitoring of Pico-Strike devices
0
fork
atom
overview
issues
pulls
pipelines
Fix warning timestamp deserialisation
sachy.dev
2 weeks ago
9c0c8733
9ba3ebbd
+1
-5
2 changed files
expand all
collapse all
unified
split
src
device.rs
views
monitoring.rs
-4
src/device.rs
···
59
59
pub struct Timestamp(pub jiff::Timestamp);
60
60
61
61
impl Timestamp {
62
62
-
pub fn from_seconds(stamp: i64) -> Result<Self, jiff::Error> {
63
63
-
jiff::Timestamp::from_second(stamp).map(Self)
64
64
-
}
65
65
-
66
62
pub fn from_microseconds(stamp: i64) -> Result<Self, jiff::Error> {
67
63
jiff::Timestamp::from_microsecond(stamp).map(Self)
68
64
}
+1
-1
src/views/monitoring.rs
···
140
140
}
141
141
StrikerResponse::Update(Update::Warning { timestamp, level }) => {
142
142
entity.with_related::<StormSource>((
143
143
-
Timestamp::from_seconds(timestamp)?,
143
143
+
Timestamp::from_microseconds(timestamp)?,
144
144
StormLevel(level),
145
145
));
146
146
}