I would like to bring the subject of ticket #1328 about Asio async high-resolution waitable timers support back under the attention but in a more cross platform context, since Asio is cross-platform.
Summarized the arguments for suggesting support for high resolution waitable timers in Asio are in essence that :
The standard C++ library does not force a C++ implementation to effectively provide nanosecond level timing and allows the high resolution clock to be mapped to, say, the steady clock. See NOTE in https://en.cppreference.com/w/cpp/chrono/high_resolution_clock
Major Standard C++ implementation (e.g. MSVC Windows, GNU Linux) do not map the OS high resolution clock support but map the steady clock instead with its 15-25ms precision limitation, (15ms + a variable OS Thread Scheduler delay).
High Res timer implementations are proprietary and poorly covered for cross platform :
---> CreateWaitableTimerHighResolution() & CREATE_WAITABLE_TIMER_HIGH_RESOLUTION flag on Windows
---> timer_create() and timer_settime() functions with the CLOCK_MONOTONIC or CLOCK_REALTIME clock IDs for nanoseconds level timing on Linux and other OS that support the POSIX API.
Asio being an async IO library, it would be the library be excellence to 'even out' these shortcomings of the C++ specs & C++ implementations.
As CPU/GPU/Bus IO/Networking speeds keep increasing, finer grained timeouts and timers become more important.
Multi-media, gaming and 3D headset applications need better then 15ms precision timers for 60-90-120 fps.
High speed lock-free atomic event queues would need 100 microsecond timeout loops in order not to loose their lock-free advantage.
For these reasons I would like to attract the attention of this to the makers of this great Asio library and see if someone could take a positions as to this subject (such as - we will never add this, we could add this, we will add this,...). This would allow developers to know if they need to look for other solutions, possibly temporary, or if they can keep using the Asio async. high_resolution_clock C++ Standard notation timers, knowing that Asio will map the object to a real high resolution clock.
I would also like to call for support from other posters to find out what their take is on the high resolution timers subject as i suspect that many developers would be served by using Asio with cross platform async. timers that are really based on an high resolution clock instead of on a mapped lower resolution clock.
I would like to bring the subject of ticket #1328 about Asio async high-resolution waitable timers support back under the attention but in a more cross platform context, since Asio is cross-platform.
Summarized the arguments for suggesting support for high resolution waitable timers in Asio are in essence that :
The standard C++ library does not force a C++ implementation to effectively provide nanosecond level timing and allows the high resolution clock to be mapped to, say, the steady clock. See NOTE in https://en.cppreference.com/w/cpp/chrono/high_resolution_clock
Major Standard C++ implementation (e.g. MSVC Windows, GNU Linux) do not map the OS high resolution clock support but map the steady clock instead with its 15-25ms precision limitation, (15ms + a variable OS Thread Scheduler delay).
High Res timer implementations are proprietary and poorly covered for cross platform : ---> CreateWaitableTimerHighResolution() & CREATE_WAITABLE_TIMER_HIGH_RESOLUTION flag on Windows ---> timer_create() and timer_settime() functions with the CLOCK_MONOTONIC or CLOCK_REALTIME clock IDs for nanoseconds level timing on Linux and other OS that support the POSIX API.
Asio being an async IO library, it would be the library be excellence to 'even out' these shortcomings of the C++ specs & C++ implementations.
As CPU/GPU/Bus IO/Networking speeds keep increasing, finer grained timeouts and timers become more important.
Multi-media, gaming and 3D headset applications need better then 15ms precision timers for 60-90-120 fps.
High speed lock-free atomic event queues would need 100 microsecond timeout loops in order not to loose their lock-free advantage.
For these reasons I would like to attract the attention of this to the makers of this great Asio library and see if someone could take a positions as to this subject (such as - we will never add this, we could add this, we will add this,...). This would allow developers to know if they need to look for other solutions, possibly temporary, or if they can keep using the Asio async. high_resolution_clock C++ Standard notation timers, knowing that Asio will map the object to a real high resolution clock.
I would also like to call for support from other posters to find out what their take is on the high resolution timers subject as i suspect that many developers would be served by using Asio with cross platform async. timers that are really based on an high resolution clock instead of on a mapped lower resolution clock.
Thank you.