Quantcast
Channel: how to implement timer in C/C++ - Stack Overflow
Browsing latest articles
Browse All 4 View Live

Answer by Björn Pollex for how to implement timer in C/C++

Boost.Asio provides Timers.

View Article



Answer by Vatine for how to implement timer in C/C++

In plain C, I would've considered using the alarm(2) or setitimer(2) functions. Alternatively, spawn a thread and do the waiting from there.If you decide on the alarm or setitimer routes, bear in mind...

View Article

Answer by BЈовић for how to implement timer in C/C++

For a general solution, you could start a thread, which sends some message to the main thread after 2 hours.For linux, you could use this:http://linux.die.net/man/3/alarmand then handle the SIGALRM signal

View Article

how to implement timer in C/C++

I want to call a function of the business class after every 2 hours.I m not getting any way to implement same in C/C++ without using a while loop.My problem is that i cannot use while(1) as this does...

View Article
Browsing latest articles
Browse All 4 View Live




Latest Images