Fix comments and implementation of channel_storage_duration to match
Rounding down minimum times in the implementation is not intuitive or
helpful for making the human-written config reflect the desired end
state.
Change-Id: I9e64bba34db88f340f828db5adb0dcc6b39d81be
diff --git a/aos/events/shm_event_loop.cc b/aos/events/shm_event_loop.cc
index a8e227e..05a1ad0 100644
--- a/aos/events/shm_event_loop.cc
+++ b/aos/events/shm_event_loop.cc
@@ -165,7 +165,7 @@
: channel_(channel),
lockless_queue_memory_(
channel,
- chrono::duration_cast<chrono::seconds>(chrono::nanoseconds(
+ chrono::ceil<chrono::seconds>(chrono::nanoseconds(
event_loop->configuration()->channel_storage_duration()))),
lockless_queue_(lockless_queue_memory_.memory(),
lockless_queue_memory_.config()),
@@ -350,7 +350,7 @@
: RawSender(event_loop, channel),
lockless_queue_memory_(
channel,
- chrono::duration_cast<chrono::seconds>(chrono::nanoseconds(
+ chrono::ceil<chrono::seconds>(chrono::nanoseconds(
event_loop->configuration()->channel_storage_duration()))),
lockless_queue_(lockless_queue_memory_.memory(),
lockless_queue_memory_.config()),