|
|
|
|
|
by onox
1548 days ago
|
|
In Ada you can do something similar: delay 0.3;
Or with package Ada.Real_Time: delay To_Duration (Milliseconds (300));
Or use `delay until`: delay until Clock + Milliseconds (300);
`delay until` is useful in loops because `delay` sleeps at least the given duration, so you get drift. (You call Clock only once and store it in a variable before the loop and then update it adding the time span each iteration) |
|
edit: s/thread/this_thread/