diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-07-24 16:50:00 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-07-24 16:50:00 +0200 |
commit | 0af0c6f1613fc8acc2d676341b32eb489c57491c (patch) | |
tree | 89392f6e4352cce8d101234de024e49e5ccb0f72 /src/fig/FIG0_19.cpp | |
parent | 47c0abb544590f7a3472c36dc1d405265235e3bb (diff) | |
download | dabmux-0af0c6f1613fc8acc2d676341b32eb489c57491c.tar.gz dabmux-0af0c6f1613fc8acc2d676341b32eb489c57491c.tar.bz2 dabmux-0af0c6f1613fc8acc2d676341b32eb489c57491c.zip |
Use absolute expiry time in TransitionHandler
This is because we cannot guarantee that the update function is
called in regular intervals.
Diffstat (limited to 'src/fig/FIG0_19.cpp')
-rw-r--r-- | src/fig/FIG0_19.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/fig/FIG0_19.cpp b/src/fig/FIG0_19.cpp index f62e1a7..f032bd5 100644 --- a/src/fig/FIG0_19.cpp +++ b/src/fig/FIG0_19.cpp @@ -51,10 +51,7 @@ FillStatus FIG0_19::fill(uint8_t *buf, size_t max_size) auto ensemble = m_rti->ensemble; - // We are called every 24ms, and must timeout after 2s - const int timeout = 2000/24; - - m_transition.update_state(timeout, ensemble->clusters); + m_transition.update_state(std::chrono::seconds(2), ensemble->clusters); FillStatus fs; ssize_t remaining = max_size; |