Changeset 153
- Timestamp:
- 01/27/10 15:30:56 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/ListenToArduino/ListenToArduino.cc
r150 r153 35 35 36 36 37 FILE * openOutfile(char * path);38 static int poll_stdin_time(int microsekunden);37 FILE * openOutfile(char *); 38 static int poll_stdin_time(int); 39 39 40 40 volatile int STOP=FALSE; … … 196 196 fclose(outfile); 197 197 198 if (poll_stdin_time( 1500000)==1) {198 if (poll_stdin_time(atoi(Srv.GetConfig("Period", "10")))==1) { 199 199 STOP=TRUE; 200 200 } … … 267 267 } 268 268 269 static int poll_stdin_time(int microsekunden) {269 static int poll_stdin_time(int sekunden) { 270 270 struct timeval timeout; 271 271 fd_set read_fds; … … 275 275 FD_ZERO(&read_fds); 276 276 FD_SET(STDIN_FILENO, &read_fds); 277 timeout.tv_sec = 0;278 timeout.tv_usec = microsekunden;277 timeout.tv_sec = sekunden; 278 timeout.tv_usec = 0; 279 279 stdin_status = select(STDIN_FILENO+1, &read_fds, NULL, NULL, &timeout); 280 280 if (stdin_status == 1 ) {
Note:
See TracChangeset
for help on using the changeset viewer.