This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Alarm callbacks on Windows with Gnu or MinGW?
- From: "Dana Good" <dpgood at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 7 Mar 2007 14:46:55 -0800
- Subject: Alarm callbacks on Windows with Gnu or MinGW?
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