I worked for some time on Linux and did some C programs, and now I need to create a Windows application, but it is not easy to find a replacement for the alarm function (found on signal.h) ..
The fact is that in Linux, when you set the alarm flag as SIGALRM (if you are not mistaken), what the OS is going to do is to perform some function when the alarm goes off. Example:
signal(SIGALRM, myfunc); alarm (2);
What will happen in this example is that the OS will call the myfunc function every 2 seconds (there will probably be milliseconds on Windows, but donβt pay attention to it right now).
I was looking for some time how to do the same in windows (only using windows.h atm), but I can not find a replacement for this (thousands of times on msdn), and on the windows there is no SIGALRM sign on the signal. h .....
What can I use in C to perform the same behavior as an alarm with the SIGALRM flag? (In other words, a function that allows you to perform another function with an alarm or similar).
source share