diff --git a/src/beep.c b/src/beep.c index 33c6d7f..f24bc91 100644 --- a/src/beep.c +++ b/src/beep.c @@ -4,7 +4,6 @@ #include // for usleep() #include "beep.h" -#include "util.h" #ifdef PORTAUDIO // http://stackoverflow.com/questions/7678470/generating-sound-of-a-particular-frequency-using-gcc-in-ubuntu @@ -184,7 +183,7 @@ int beep(double freq_hz, double duration_sec) { if (freq_hz <= 0.0) { - msleep(duration_sec*1000.); + usleep(duration_sec*1000.*1000); return 0; } double p1,p2,f1,f2; diff --git a/src/util.h b/src/util.h index 558511d..da857f3 100644 --- a/src/util.h +++ b/src/util.h @@ -2,4 +2,4 @@ void current_utc_time(struct timespec *ts); long fastclock(void); int kbhit (void); void msleep(int d); -extern void *get_in_addr(struct sockaddr *sa); +void *get_in_addr(struct sockaddr *sa);