libstdc++: VxWorks: Enable clock_gettime
libstdc++ now uses `clock_gettime` on VxWorks, enabling more precise time measurements with `chrono`.
libstdc++ on VxWorks can now use the clock_gettime function, which provides more precise time measurements than the previously used gettimeofday. This change enables the <chrono> library to work with earlier VxWorks 6.9 releases and allows clocks and deadlines to operate with the same precision, reducing potential inaccuracies.
In Details
The commit enables clock_gettime for VxWorks by modifying acinclude.m4 to enable monotonic and realtime clocks. Previously, gettimeofday was used. This allows <chrono> to work with earlier VxWorks 6.9 releases. clock_gettime was already used in __gthread_cond_timedwait.
For Context
The C++ standard library provides time-related functions through the <chrono> header. This commit enables the use of a more precise timer function, clock_gettime, on the VxWorks operating system. This improvement allows for more accurate time measurements and better precision when working with clocks and deadlines in C++ code running on VxWorks.