Add portable wrapper for poll().
authorbruceperens <bruceperens@01035d8c-6547-0410-b346-abe4f91aad63>
Tue, 18 Mar 2014 18:43:13 +0000 (18:43 +0000)
committerbruceperens <bruceperens@01035d8c-6547-0410-b346-abe4f91aad63>
Tue, 18 Mar 2014 18:43:13 +0000 (18:43 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@1451 01035d8c-6547-0410-b346-abe4f91aad63

freedv-server/source/drivers.h
freedv-server/source/run.cpp

index 9661bac02572b51faa330eb680b9ff59edd0a4de..bf147c1d4e1da6fe16c7bc615abf5c65b6f9e072 100644 (file)
@@ -227,6 +227,9 @@ public:
     typedef struct pollfd      PollType;
 
     /// Poll file descriptors for available I/O.
+    static  int                poll(PollType * array, int length, int timeout);
+
+    /// Get the file descriptors to be used to poll for available I/O.
     virtual int                poll_fds(PollType * array, int space) = 0;
 
     virtual            ~IODevice() = 0;
index f84ff7479ebf61a54859bd2b8bc956907df3a51c..897fe61c56dc579cf74892ab108b870e38abfa5b 100644 (file)
@@ -4,9 +4,7 @@
 #include <iostream>
 #include <sstream>
 #include <stdexcept>
-#include <unistd.h>
 #include <string.h>
-#include <sys/time.h>
 
 /// FIX:
 ///
@@ -96,9 +94,6 @@ namespace FreeDV {
   void
   Run::receive()
   {
-    struct timespec    start_time;
-    clock_gettime(CLOCK_MONOTONIC, &start_time);
-
     // Drain any data that the loudspeaker can take.
     const std::size_t  out_samples = min(
                         i->loudspeaker->ready(),