refactor: standardize timing with monotonic clocks, remove redundant stream parsing

This commit is contained in:
jack
2026-06-15 11:37:51 -07:00
parent a70764e08c
commit b34b920759
2 changed files with 3 additions and 19 deletions
@@ -1,6 +1,7 @@
"""QML-facing controller for the live/review wafer dashboard."""
from __future__ import annotations
import logging
import time
from typing import Any, Optional
from PySide6.QtCore import QObject, Property, QTimer, Qt, Signal, Slot
@@ -325,10 +326,7 @@ class SessionController(QObject):
result = -result
values.append(result)
# Create a mock timestamp or use elapsed time since start.
# We don't have a time value from the binary stream header right now.
t = seq * 0.05 # approx 20Hz if seq increments 1 per frame
return Frame(seq=seq, time=t, values=values)
return Frame(seq=seq, time=time.monotonic(), values=values)
# Clear out any old data from the prev sessions
self._model.reset()