mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0024665: A sample for advanced function mechanism
Update for Linux platform
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#include "FThread.h"
|
||||
#include "GraphWidget.h"
|
||||
#include "graphwidget.h"
|
||||
|
||||
#include <TFunction_Function.hxx>
|
||||
#include <TFunction_IFunction.hxx>
|
||||
@@ -67,7 +67,11 @@ void FThread::run()
|
||||
{
|
||||
L = getFreeFunction();
|
||||
if (L.IsNull())
|
||||
::Sleep(100);
|
||||
#ifdef __GNUC__
|
||||
sleep(0.001);
|
||||
#else
|
||||
::Sleep(100);
|
||||
#endif
|
||||
else
|
||||
break;
|
||||
}
|
||||
@@ -123,4 +127,4 @@ void FThread::run()
|
||||
}// while (More())
|
||||
|
||||
graph->setFinished();
|
||||
}
|
||||
}
|
||||
|
@@ -54,6 +54,9 @@
|
||||
#include <TDataStd_Name.hxx>
|
||||
#include <TDataStd_Real.hxx>
|
||||
#include <TDataStd_RealArray.hxx>
|
||||
#ifdef __GNUC__
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
MainWindow::MainWindow()
|
||||
{
|
||||
@@ -171,7 +174,11 @@ void MainWindow::compute()
|
||||
|
||||
// Process user-events.
|
||||
qApp->processEvents();
|
||||
::Sleep(100);
|
||||
#ifdef __GNUC__
|
||||
sleep(0.001);
|
||||
#else
|
||||
::Sleep(100);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -660,4 +667,4 @@ void MainWindow::createDefaultModel2()
|
||||
graph->createModel(doc);
|
||||
|
||||
//app->SaveAs(doc, "W:\\TestFM\\model2.cbf");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user