Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support std::chrono types for set_time on rerun::RecordingStream #4134

Merged
merged 4 commits into from
Nov 3, 2023

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented Nov 2, 2023

What

You can now use both chrono timepoints and chrono durations to set the time!

using namespace std::chrono_literals;
rec.set_time("duration", 1.0ms)
rec.set_time("duration", 1000ms)
rec.set_time("clock", std::chrono::system_clock::now());

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested demo.rerun.io (if applicable)
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG

@Wumpf Wumpf added enhancement New feature or request 🌊 C++ API C/C++ API specific include in changelog labels Nov 2, 2023
@teh-cmc teh-cmc requested review from teh-cmc and removed request for teh-cmc November 3, 2023 07:40
@Wumpf Wumpf merged commit 2f7af01 into main Nov 3, 2023
39 checks passed
@Wumpf Wumpf deleted the andreas/cpp/support-chrono branch November 3, 2023 08:21
jprochazk pushed a commit that referenced this pull request Nov 3, 2023
…4134)

### What

You can now use both chrono timepoints and chrono durations to set the
time!

```cpp
using namespace std::chrono_literals;
rec.set_time("duration", 1.0ms)
rec.set_time("duration", 1000ms)
rec.set_time("clock", std::chrono::system_clock::now());
```

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested [demo.rerun.io](https://demo.rerun.io/pr/4134) (if
applicable)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG

- [PR Build Summary](https://build.rerun.io/pr/4134)
- [Docs
preview](https://rerun.io/preview/802408d616f9dd9f976905b27df6ecc13df1b57a/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/802408d616f9dd9f976905b27df6ecc13df1b57a/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://ref.rerun.io/dev/bench/)
- [Wasm size tracking](https://ref.rerun.io/dev/sizes/)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌊 C++ API C/C++ API specific enhancement New feature or request include in changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants