ENH: Add a delay method

This commit is contained in:
Andy Cedilnik 2005-01-04 10:55:01 -05:00
parent 8032c5cd88
commit 320e90ef5a
2 changed files with 12 additions and 0 deletions

View File

@ -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;

View File

@ -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
/**