ENH: Add a delay method
This commit is contained in:
parent
8032c5cd88
commit
320e90ef5a
|
@ -2100,6 +2100,15 @@ kwsys_stl::string SystemTools::FileExistsInParentDirectories(const char* fname,
|
|||
return "";
|
||||
}
|
||||
|
||||
void SystemTools::Delay(unsigned int msec)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
Sleep(msec);
|
||||
#else
|
||||
usleep(msec * 1000);
|
||||
#endif
|
||||
}
|
||||
|
||||
// These must NOT be initialized. Default initialization to zero is
|
||||
// necessary.
|
||||
unsigned int SystemToolsManagerCount;
|
||||
|
|
|
@ -338,6 +338,9 @@ public:
|
|||
static kwsys_stl::string FileExistsInParentDirectories(const char* fname,
|
||||
const char* directory, const char* toplevel);
|
||||
|
||||
/** Delay the execution for a specified amount of time specified in miliseconds */
|
||||
static void Delay(unsigned int msec);
|
||||
|
||||
protected:
|
||||
// these two functions can be called from ConvertToOutputPath
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue