21 Jun
2022
21 Jun
'22
11:20 p.m.
On 21/06/2022 21:35, Richard Hodges wrote:
while(t < t1) { ::usleep(1); t = clock_type::now(); }
While yes, you can do this sort of thing, my point was that most of the time if you think you need to, you're wrong. It's ok to use this sort of code for embedded hardware where you're absolutely in control of whatever else is running on the whole PC (but even then, only if you really need it, which should be seldom). Don't even think about it for a general release.