Enhancement of the CommonViewPeriod #30
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
1. CommonViewPeriod::first_track_offset_nanos() returns zero if it is not a bipm_common_view_period.
The 4-minute offset is only applicable to BIPM; for custom periods,
0
might be more reasonable.2. CommonViewPeriod::next_period_start() adds a return value to indicate whether the next CommonViewPeriod is t0.
After calling
CommonViewPeriod::next_period_start()
, we should know if it's t0. Without this information, we won't know how to preserve the measurement data during the overlap period.If it's t0, we should start recording the measurement count in the tracker and do nothing else. On the next t (t_89), we remove the recorded count from the tracker.
NOTE: This logic only works when there is an overlap period spanning days(BIPM period). If there is no overlap period, the tracker should always be reset before starting a new tracking.