20.10.2013 - Modified PIObject - virtual debugName() for macro piCoutObj, improved timer measurements and timers on Windows

This commit is contained in:
peri4
2013-10-20 17:41:55 +04:00
parent 0f1b528ac6
commit ec5530053a
32 changed files with 2196 additions and 1331 deletions

View File

@@ -59,7 +59,11 @@ class PIP_EXPORT PIThread: public PIObject
{
PIOBJECT(PIThread)
public:
//! Contructs thread with custom data "data", external function "func" and main cycle delay "timer_delay".
PIThread(void * data, ThreadFunc func, bool startNow = false, int timer_delay = -1);
//! Contructs thread with main cycle delay "timer_delay".
PIThread(bool startNow = false, int timer_delay = -1);
virtual ~PIThread();
@@ -208,8 +212,14 @@ protected:
static void * thread_function(void * t);
static void * thread_function_once(void * t);
//! Function executed once at the start of thread.
virtual void begin() {;}
//! Function executed at every "timer_delay" msecs until thread was stopped.
virtual void run() {;}
//! Function executed once at the end of thread.
virtual void end() {;}
volatile bool terminating, running, lockRun;