trying to fix strange timestamp error: make argus think that timestamps are actually in seconds

This commit is contained in:
Joeri Exelmans 2025-11-05 15:50:43 +01:00
parent b8092f6208
commit b9f104f877
2 changed files with 2 additions and 2 deletions

Binary file not shown.

View file

@ -66,7 +66,7 @@ pub fn eval_boolean(s: &str, js_trace: JsValue) -> JsValue {
});
if let Signal::<f64>::Sampled { values, time_points } = signal {
values.push(*val);
time_points.push(Duration::from_millis(entry.simtime as u64));
time_points.push(Duration::from_secs(entry.simtime as u64));
}
else {
return JsValue::from_str("this should never happen");
@ -109,7 +109,7 @@ pub fn eval_boolean(s: &str, js_trace: JsValue) -> JsValue {
r.iter().for_each(|(timestamp, satisfied), | {
console::debug_1(&JsValue::from_str(format!("timestamp: {}s {}ms", timestamp.as_secs(), (timestamp.as_millis() as f64)).as_str()));
result.push(StateBuddyEvalResultEntry{
timestamp: timestamp.as_millis() as f64,
timestamp: timestamp.as_secs() as f64,
satisfied: *satisfied,
});
});