Alarm callbacks on Windows with Gnu or MinGW?

Dana Good dpgood@gmail.com
Wed Mar 7 23:18:00 GMT 2007


Please excuse me if this is the wrong location for this post - I
looked long and hard before I posted, and would be happy to be
redirected!

I am using C++ in Eclipse with CDT and MinGW on a Windows machine.
I'd prefer not to use VC++.

I would like to implement a simple alarm callback, a la 'C', where I
set a timer to go off and use a signal catcher to catch the
interrupt/exception/signal/whatever.

(as, on Unix/Linux, signal(SIG_ALRM, FPTR); alarm(nsec); where FPTR is
a pointer to a function that will asynchronously handle the signal
SIG_ALRM)

I don't find support for SIG_ALRM in MinGW, though other signals are defined.

My Googles have left me fairly convinced that I can't do this without
including the VC++ libraries - is this true?

Thanks,

Dana Good



More information about the Gcc-help mailing list