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

fix(ecs): Use DateTime.UtcNow.Ticks instead of Stopwatch.GetTimestamp #444

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MrDave1999
Copy link
Contributor

Stopwatch.GetTimestamp is causing issues on Linux. On this platform, timers run immediately instead of executing at the specified interval. This behavior does not occur on Windows, where the timer works as expected and runs at the correct interval.

@ikkentim
Copy link
Owner

ikkentim commented Mar 1, 2025

GetTimestamp uses QueryPerformanceFrequency which should be better performant and acurate. if you show me some repro code i can take a look at the bug you're running into

@MrDave1999
Copy link
Contributor Author

@ikkentim I don't really have a specific code for you to reproduce the problem, since I had this problem some time ago on my server and I had to publish my own version of SampSharp.Entities.

Perhaps the example of aSpine could be used: https://discord.com/channels/758751593725558794/758944561132994570/959920070363070504

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.

2 participants