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

PointerPoint.Timestamp should be in microseconds #14535

Open
dr1rrb opened this issue Nov 23, 2023 · 0 comments
Open

PointerPoint.Timestamp should be in microseconds #14535

dr1rrb opened this issue Nov 23, 2023 · 0 comments
Labels
difficulty/medium 🤔 Categorizes an issue for which the difficulty level is reachable with a good understanding of WinUI kind/bug Something isn't working platform/all Categorizes an issue or PR as relevant to the all platforms project/pointers 🖱️ Categorizes an issue or PR as relevant to mouse/touch/pen pointers

Comments

@dr1rrb
Copy link
Member

dr1rrb commented Nov 23, 2023

Current behavior

But some places in uno assume this to be ticks, like the GestureRecognizer for the hold: https://github.com/unoplatform/uno/blob/master/src/Uno.UWP/UI/Input/GestureRecognizer.Gesture.cs#L392. We need to review all usages of this Timestamp property.

The GestureRecognizer.GetVelocities also assume ticks

var elapsedTicks = _inertia?.Elapsed ?? (double)_currents.Timestamp - _lastPublishedState.timestamp;

Expected behavior

Micro seconds as on windows The time, relative to the system boot time, in microseconds. (Note: this should be confirmed as it already happen that the docs differs from observations for those kind of core low-level properties).

Anything else we need to know?

This property is documented to be relative to the system boot time, but this might have a negative perf impact on some platforms (e.g. Android) or even completely impossible to get. As this property is usually only used relative to itself (e.g. determine since how long the pointer is down), the only important thing is to have a valid value and in the right unit, the origin is not really relevant.

@dr1rrb dr1rrb added kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. labels Nov 23, 2023
@Youssef1313 Youssef1313 added the project/pointers 🖱️ Categorizes an issue or PR as relevant to mouse/touch/pen pointers label Nov 23, 2023
@MartinZikmund MartinZikmund added platform/all Categorizes an issue or PR as relevant to the all platforms difficulty/medium 🤔 Categorizes an issue for which the difficulty level is reachable with a good understanding of WinUI and removed triage/untriaged Indicates an issue requires triaging or verification difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. labels Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty/medium 🤔 Categorizes an issue for which the difficulty level is reachable with a good understanding of WinUI kind/bug Something isn't working platform/all Categorizes an issue or PR as relevant to the all platforms project/pointers 🖱️ Categorizes an issue or PR as relevant to mouse/touch/pen pointers
Projects
None yet
Development

No branches or pull requests

3 participants