Changeset 96
- Timestamp:
- 07/28/09 10:14:07 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/SkyQualityMonitor/sqm.cpp
r95 r96 45 45 printf("+++ Sky Quality Monitor Interface +++\n"); 46 46 printf("Usage: %s <server name> <port> <slow data dir> <period (sec)>\n", argv[0]); 47 printf("Taking defaults: <%s> <%d> <%s> < d>\n", ServerName, DAQPort, SlowDir, Period);47 printf("Taking defaults: <%s> <%d> <%s> <%d>\n", ServerName, DAQPort, SlowDir, Period); 48 48 } 49 49 else { … … 94 94 printf("Error: Could not write read command to socket.\n"); 95 95 } 96 usleep( Period*1e6/2); // Wait half period here to allow for response96 usleep((int) (Period*1e6/2)); // Wait half period here to allow for response 97 97 98 98 // Wait for data from socket with time-out 99 99 FD_ZERO(&ReadFileDescriptor); 100 100 FD_SET(SocketDescriptor, &ReadFileDescriptor); 101 struct timeval WaitTime = {P ERIOD, 0};101 struct timeval WaitTime = {Period, 0}; 102 102 if (select(((int) SocketDescriptor)+1, &ReadFileDescriptor, NULL, NULL, &WaitTime)==-1) { 103 103 perror("Error with select()"); … … 128 128 printf("\r%s %s CTRL-c to exit.",Buffer, asctime(localtime(&Time))); 129 129 fflush(stdout); 130 usleep( Period*1e6/2); // Wait second half period here130 usleep((int) (Period*1e6/2)); // Wait second half period here 131 131 132 132 } // while()
Note:
See TracChangeset
for help on using the changeset viewer.