-
Notifications
You must be signed in to change notification settings - Fork 746
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
Input event Timestamp
should be in microseconds
#19147
base: master
Are you sure you want to change the base?
Conversation
d89af73
to
d381d61
Compare
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-19147/index.html |
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-19147/index.html |
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-19147/index.html |
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-19147/index.html |
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-19147/index.html |
571c30e
to
0ab0b79
Compare
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-19147/index.html |
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-19147/index.html |
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-19147/index.html |
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-19147/index.html |
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.
Thank you so much to have renamed all variables to reflect the new unit 🙏
_bootTime ??= DateTime.UtcNow.Ticks - (long)(TimeSpan.TicksPerSecond * new NSProcessInfo().SystemUptime); | ||
|
||
return (ulong)_bootTime.Value + (ulong)(TimeSpan.TicksPerSecond * timestamp); | ||
// iOS Timestamp is in seconds from boot time. |
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.
This was to patch something like the timestamp
being "paused" when the app was not in foreground (if I've good memory). Did you look in the history why it has been added and confirmed that it's no longer needed?
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.
@dr1rrb Based on the history it is not too clear why it got introduced 🤔 . However I don't yet understand how it works -
On the first call to ToTimeStamp
the _bootTime
is initialized to (current time) - (systemuptime) = the datetime when the device was booted up represented as ticks.
On subsequent time it calculates (boot time ticks) + timestamp = the datetime of the event represented as ticks. However, the output value should be just time span since boot time, not the datetime represented as ticks. Also, if the timestamp
is the thing that gets paused when app is going in background, it will still result in the same value, as boot time remains constant from the first assignment
Finally I found that NSProcessInfo.SLystemUptime
is potentially problematic 👀 - https://developer.apple.com/documentation/foundation/nsprocessinfo/1414553-systemuptime#discussion
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-19147/index.html |
3c6b663
to
d211256
Compare
d211256
to
ae1a42d
Compare
src/Uno.UI.Runtime.Skia.MacOS/UnoNativeMac/UnoNativeMac/UNOApplication.m
Outdated
Show resolved
Hide resolved
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-19147/index.html |
The build 151356 found UI Test snapshots differences: Details
|
|
GitHub Issue (If applicable): closes #14535
PR Type
What kind of change does this PR introduce?
What is the current behavior?
What is the new behavior?
PR Checklist
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Run
results.Other information
Internal Issue (If applicable):