How can I call a function every certain time?

Asked 2 years ago, Updated 2 years ago, 31 views

I'd like to know how to call a function after a certain period of time or delay the execution of the function, as the title suggests

c++

2022-09-22 19:49

1 Answers

Different operating systems may have different implementation methods, but they usually use timers and threads.

For Windows, refer to https://msdn.microsoft.com/en-us/library/windows/desktop/ms632592(v=vs.85).aspx Rank.

For Linux, see http://man7.org/linux/man-pages/man2/timer_create.2.html.


2022-09-22 19:49

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.