Changeset 96 for tools/SkyQualityMonitor


Ignore:
Timestamp:
07/28/09 10:14:07 (15 years ago)
Author:
ogrimm
Message:
Changed cast for usleep()
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/SkyQualityMonitor/sqm.cpp

    r95 r96  
    4545    printf("+++ Sky Quality Monitor Interface +++\n");
    4646    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);
    4848  }
    4949  else {
     
    9494      printf("Error: Could not write read command to socket.\n");
    9595    }
    96     usleep(Period*1e6/2);  // Wait half period here to allow for response
     96    usleep((int) (Period*1e6/2));  // Wait half period here to allow for response
    9797   
    9898    // Wait for data from socket with time-out
    9999    FD_ZERO(&ReadFileDescriptor);   
    100100    FD_SET(SocketDescriptor, &ReadFileDescriptor);
    101     struct timeval WaitTime = {PERIOD, 0};
     101    struct timeval WaitTime = {Period, 0};
    102102    if (select(((int) SocketDescriptor)+1, &ReadFileDescriptor, NULL, NULL, &WaitTime)==-1) {
    103103      perror("Error with select()");
     
    128128    printf("\r%s %s CTRL-c to exit.",Buffer, asctime(localtime(&Time)));
    129129    fflush(stdout);
    130     usleep(Period*1e6/2); // Wait second half period here
     130    usleep((int) (Period*1e6/2)); // Wait second half period here
    131131 
    132132  } // while()
Note: See TracChangeset for help on using the changeset viewer.