Changeset 2044 for trunk


Ignore:
Timestamp:
Aug 9, 2014 7:17:30 AM (5 years ago)
Author:
stefan
Message:

use Sleep on windows and usleep on non-windows

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Clp/src/ClpSolve.cpp

    r2026 r2044  
    1515
    1616#include <math.h>
     17#ifdef _MSC_VER
     18#include <windows.h>   // for Sleep()
     19#ifdef small
     20#undef small
     21#endif
     22#else
     23#include <unistd.h>    // for usleep()
     24#endif
    1725
    1826#include "CoinHelperFunctions.hpp"
     
    54155423    }
    54165424    if (!finished) {
    5417       struct timespec time1, time2;
    5418       time1.tv_sec = 0;
    5419       time1.tv_nsec = 100000;
    5420       nanosleep(&time1 , &time2);
     5425#ifdef _WIN32
     5426      // wait 1 millisecond
     5427      Sleep(1);
     5428#else
     5429      // wait 0.1 millisecond
     5430      usleep(100);
     5431#endif
    54215432    }
    54225433  }
Note: See TracChangeset for help on using the changeset viewer.