Skip to content

feat(clock): add shared clock primitives and clock-aware timestamps#136

Open
schmidma wants to merge 2 commits intoZettaScaleLabs:mainfrom
schmidma:clock
Open

feat(clock): add shared clock primitives and clock-aware timestamps#136
schmidma wants to merge 2 commits intoZettaScaleLabs:mainfrom
schmidma:clock

Conversation

@schmidma
Copy link
Contributor

Description

This change adds a small, explicit time layer to ros-z: ZClock, ZTime, ZDuration, and context/node plumbing so all entities created from a context can share the same clock source.

ros-z now provides a consistent clock abstraction and uses it for attachment timestamps, but it does not introduce an executor, replay system, or higher-level runtime model. That keeps the API generally useful while making simulated or externally controlled time possible for downstream runtimes.

Scope is intentionally narrow. This PR only adds the time substrate and the minimum wiring needed to propagate it through publishers, services, parameter services, and type description services. It avoids adding capture, replay, or other helpers.

Checklist

  • Ran ./scripts/check-local.sh successfully
  • Added/updated tests/documentation (if applicable)

@schmidma schmidma marked this pull request as ready for review March 14, 2026 07:36
@schmidma schmidma changed the title feat(clock) Add shared clock primitives and clock-aware timestamps feat(clock): Add shared clock primitives and clock-aware timestamps Mar 14, 2026
@schmidma schmidma changed the title feat(clock): Add shared clock primitives and clock-aware timestamps feat(clock): add shared clock primitives and clock-aware timestamps Mar 14, 2026
@codecov
Copy link

codecov bot commented Mar 19, 2026

Codecov Report

❌ Patch coverage is 66.66667% with 89 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/ros-z/src/time.rs 64.89% 66 Missing ⚠️
crates/ros-z/src/context.rs 46.15% 7 Missing ⚠️
crates/ros-z/src/attachment.rs 61.53% 5 Missing ⚠️
crates/ros-z/src/node.rs 77.77% 4 Missing ⚠️
crates/ros-z/src/service.rs 66.66% 4 Missing ⚠️
...ates/ros-z/src/dynamic/type_description_service.rs 0.00% 2 Missing ⚠️
...rates/ros-z/src/dynamic/type_description_client.rs 0.00% 1 Missing ⚠️
Files with missing lines Coverage Δ
crates/ros-z/src/parameter/service.rs 35.03% <100.00%> (+1.07%) ⬆️
crates/ros-z/src/pubsub.rs 45.68% <100.00%> (+1.20%) ⬆️
...rates/ros-z/src/dynamic/type_description_client.rs 22.74% <0.00%> (-0.08%) ⬇️
...ates/ros-z/src/dynamic/type_description_service.rs 30.67% <0.00%> (-0.12%) ⬇️
crates/ros-z/src/node.rs 44.18% <77.77%> (+0.49%) ⬆️
crates/ros-z/src/service.rs 78.64% <66.66%> (-0.43%) ⬇️
crates/ros-z/src/attachment.rs 83.78% <61.53%> (-16.22%) ⬇️
crates/ros-z/src/context.rs 49.18% <46.15%> (-0.18%) ⬇️
crates/ros-z/src/time.rs 64.89% <64.89%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@YuanYuYuan
Copy link
Collaborator

Hi @schmidma, could you please address the test coverage? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants