Sleep() isn't sleepy
Ralph Preston
rpreston at mitre.org
Wed Feb 8 17:54:25 UTC 2006
Hello,
Yesterday I was testing some code and threw in a sleep() statement to aid
debugging. It didn't work, and unfortunately, it seems to be more difficult
that I imagined it would be. The code compiles and runs but doesn't sleep,
I haven't stepped through the code yet to see exactly what's happening to
the sleep() since I thought it's probably a #define, or something simple
that I've missed.
I know I enabled the posix api with --enable-posix.
I'm using the hello_world_c makefile as a starting point and added "timer"
and "clock" to the managers.
To the code I added:
#include <time.h>
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
Is there anything else I need to do to get sleep() to work?
Ralph A. Preston
The MITRE Corporation
202 Burlington Road MS E095
Bedford, MA 01730
Phone: 781-271-7914 Fax: 781-271-8915 Cell: 617-335-2226
http://www.mitre.org
More information about the users
mailing list