0

How do you program and run a system of periodic tasks in C? What can we do, what can not we do?

I DON'T want the code. Just if someone can give me a first vision.

Thanks !

Micky
  • 33
  • 1
  • 1
  • 4
  • You can use `time` or `clock` using `#include `, but generally you want to just write a shell script – yyny Feb 20 '19 at 13:11
  • 1
    To complete @YoYoYonnY, you could use `SIGALRM` with `alarm` (see [this post](https://stackoverflow.com/questions/1784136/simple-signals-c-programming-and-alarm-function)). – Simon Doppler Feb 20 '19 at 13:20
  • https://stackoverflow.com/q/54618065/905902 SIGALRM+setitimer()+pause() [in Unix, that is] – wildplasser Feb 20 '19 at 13:48
  • I would use a threading library such as pthreads and use timers with condition variables to wake up each thread (task) periodically. – Chimera Feb 20 '19 at 20:31

0 Answers0