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

Use std::chrono::high_resolution_clock for LV::Time::now() #157

Open
kaixiong opened this issue Jan 11, 2023 · 0 comments
Open

Use std::chrono::high_resolution_clock for LV::Time::now() #157

kaixiong opened this issue Jan 11, 2023 · 0 comments

Comments

@kaixiong
Copy link
Member

kaixiong commented Jan 11, 2023

LV::Time::now() currently uses platform-specific implementations for its high resolution clock. Port it to use C++11's std::chrono::high_resolution_clock instead. It has a nicer interface and has better portability.

Caveat: VS2012's implementation does not use QueryPerformanceCounter and has resolution issues (
source). Resolved in VS2015. We currently only target MinGW and now require C++20, so it does not really matter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant