trying to fix strange timestamp error: make argus think that timestamps are actually in seconds
This commit is contained in:
parent
b8092f6208
commit
b9f104f877
2 changed files with 2 additions and 2 deletions
Binary file not shown.
|
|
@ -66,7 +66,7 @@ pub fn eval_boolean(s: &str, js_trace: JsValue) -> JsValue {
|
||||||
});
|
});
|
||||||
if let Signal::<f64>::Sampled { values, time_points } = signal {
|
if let Signal::<f64>::Sampled { values, time_points } = signal {
|
||||||
values.push(*val);
|
values.push(*val);
|
||||||
time_points.push(Duration::from_millis(entry.simtime as u64));
|
time_points.push(Duration::from_secs(entry.simtime as u64));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return JsValue::from_str("this should never happen");
|
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), | {
|
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()));
|
console::debug_1(&JsValue::from_str(format!("timestamp: {}s {}ms", timestamp.as_secs(), (timestamp.as_millis() as f64)).as_str()));
|
||||||
result.push(StateBuddyEvalResultEntry{
|
result.push(StateBuddyEvalResultEntry{
|
||||||
timestamp: timestamp.as_millis() as f64,
|
timestamp: timestamp.as_secs() as f64,
|
||||||
satisfied: *satisfied,
|
satisfied: *satisfied,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue