Skip to content

GlobalTimestampFitter: custom host timestamp#160

Open
wolfd wants to merge 1 commit into
orbbec:mainfrom
AutoPallet:custom-global-timestamp
Open

GlobalTimestampFitter: custom host timestamp#160
wolfd wants to merge 1 commit into
orbbec:mainfrom
AutoPallet:custom-global-timestamp

Conversation

@wolfd
Copy link
Copy Markdown

@wolfd wolfd commented May 19, 2026

This change allows the SDK user to provide a custom timestamp function. The current default timestamp function gets the global time, which is subject to NTP updates. Some users (e.g. me) might want to replace the estimated timestamp with their own function so that we can use a monotonic time source.

IGlobalTimestampFitter gets two new methods:

  • setHostClockFn: replace the default clock function with a custom one
  • setMaxValidRtt: now exposed in the interface, the max RTT before discarding a time sample.

HostClockFn is expected to return a microsecond time value.

The new functionality is also exposed in the C API.

This change allows the SDK user to provide a custom timestamp function.
The current default timestamp function gets the global time, which is
subject to NTP updates. Some users (e.g. me) might want to replace the
estimated timestamp with their own function so that we can use a
monotonic time source.

`IGlobalTimestampFitter` gets two new methods:
- `setHostClockFn`: replace the default clock function with a custom one
- `setMaxValidRtt`: now exposed in the interface, the max RTT before
  discarding a time sample.

`HostClockFn` is expected to return a microsecond time value.

The new functionality is also exposed in the C API.
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.

1 participant