feat(pj_base): add absolute time spine (Timepoint/Duration + fromRaw/toRaw)#123
Merged
Conversation
…toRaw) Introduce pj_base/time.hpp: the absolute time vocabulary one lossless step above the int64-ns PJ::Timestamp — Timepoint (sys_time<ns>), Duration, and the fromRaw/toRaw/fromRawRange seams between the int64 spine and the chrono world. These types previously lived in the application (pj_runtime/Time.h), above pj_base, so lower layers could not name absolute time without depending on the app: pj_scene3d_core re-declared structurally-identical shadow typedefs and pj_datastore could not reach the seams at all. Hosting the spine in the Level-0 SDK lets every layer share one vocabulary. Display-relative time (the Qwt-axis / playback coordinate) is an app-presentation policy and stays in the application. Header content originates from the app's MPL-2.0 pj_runtime/Time.h and is relicensed Apache-2.0 here by the copyright holder to match the SDK. Header-only (constexpr/using), depends only on pj_base/types.hpp; additive with no ABI change (abidiff baseline unaffected). Covered by time_spine_test. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
Author
|
@copilot resolve the merge conflicts in this pull request |
# Conflicts: # pj_base/CLAUDE.md # pj_base/CMakeLists.txt
Contributor
Merge conflicts resolved in commit 2610610. There were two conflicting files:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Adds
pj_base/include/pj_base/time.hpp— the absolute time vocabulary one lossless step above the int64-nsPJ::Timestamp:Timepoint(sys_time<nanoseconds>, Unix epoch) andDuration(nanoseconds)fromRaw/toRaw/fromRawRange— the only sanctioned crossing between the int64 spine and the chrono worldCovered by a new
time_spine_test(registered inPJ_BASE_TESTS).Why
These types previously lived in the PlotJuggler application (
pj_runtime/Time.h), abovepj_base, so lower layers couldn't name absolute time without depending on the app:pj_scene3d_corere-declared structurally-identical shadowTimePoint/Durationtypedefs just to stay app-freepj_datastore(Level 0) couldn't reach thefromRaw/toRawseams at allHosting the spine in the Level-0 SDK lets every layer share one vocabulary. Display-relative time (the Qwt-axis / PlaybackEngine coordinate) is an app-presentation policy and stays in the application.
Compatibility
constexpr/using), depends only onpj_base/types.hpp.abidiffbaseline unaffected (no symbols emitted into the canary).License
Header content originates from the application's MPL-2.0
pj_runtime/Time.h; relicensed Apache-2.0 here by the copyright holder to match the SDK.🤖 Generated with Claude Code