-
Notifications
You must be signed in to change notification settings - Fork 43
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
Improved interop for StepTimer with a new Event C API #486
Improved interop for StepTimer with a new Event C API #486
Conversation
… into interop-improvements-apis/timer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall seems good IMO, but I'd like to see unit tests to test the templated functionality that was added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is the templated implementation working for the C-compliant function signatures here?
# Conflicts: # src/NovelRT.Interop/CMakeLists.txt # src/NovelRT.Interop/Timing/NrtStepTimer.cpp
Almost ready to merge! (let's wait for CI, and please squash though) |
No squash. We'd like to preserve history as-is (even if there's large gaps in history). Good stuff! |
Currently, the interop implementation for
NovelRT::Timing::StepTimer
is broken. Here are some problematic snippets:Probably that
StepTimer
could previously fit in int64_t, which would explain the reference-casts. Anyway, that code does not work. That PR is going to fix this, and implements APIs forNrtUtilitiesEvent
andNrtUtilitiesEventWithTimestamp
to make fully usage of theStepTimer
. Hopefully, C maniacs will now experience the niche pleasure of staring at a timer ticking excessively fast.Additions and renovations
StepTimer
interop implementation has been mostly rewrittenEvent<>
andEvent<NovelRT::Timing::Timestamp>
, add event listeners, and invoke them in C.Implementation remarks
In the
NrtEvent.cpp
file, there are templated "generic" versions of methods and aEventImplementationDetails
struct to easily add more event types in the future in necessary. (It's macro-free!)