diff options
author | Stefan Radomski <sradomski@mintwerk.de> | 2016-01-08 22:15:37 (GMT) |
---|---|---|
committer | Stefan Radomski <sradomski@mintwerk.de> | 2016-01-08 22:15:37 (GMT) |
commit | 9f4d810400550d1b98ab944cd96f937720eb6b0d (patch) | |
tree | a30226ae642e54e217c9b89523d75f1346d5f7cb /src/uscxml/Interpreter.cpp | |
parent | f9eb54fc9c17116954846133b33f7a241e662cbc (diff) | |
download | uscxml-9f4d810400550d1b98ab944cd96f937720eb6b0d.zip uscxml-9f4d810400550d1b98ab944cd96f937720eb6b0d.tar.gz uscxml-9f4d810400550d1b98ab944cd96f937720eb6b0d.tar.bz2 |
Fixed compilation for gcc on Linux again
Diffstat (limited to 'src/uscxml/Interpreter.cpp')
-rw-r--r-- | src/uscxml/Interpreter.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/uscxml/Interpreter.cpp b/src/uscxml/Interpreter.cpp index 169d9f6..736a740 100644 --- a/src/uscxml/Interpreter.cpp +++ b/src/uscxml/Interpreter.cpp @@ -57,6 +57,12 @@ # include "uscxml/interpreter/InterpreterRC.h" #endif +#ifdef BUILD_PROFILING +#define TIME_BLOCK Measurement msm(&timer); +#else +#define TIME_BLOCK (0); +#endif + #define VERBOSE 0 /// valid interpreter state transitions @@ -772,7 +778,8 @@ NodeSet<std::string> InterpreterImpl::getDocumentInitialTransitions() { } InterpreterState InterpreterImpl::step(int waitForMS) { - try { + TIME_BLOCK + try { tthread::lock_guard<tthread::recursive_mutex> lock(_mutex); if (_state == USCXML_FINISHED || _state == USCXML_DESTROYED) { @@ -967,8 +974,8 @@ EXIT_INTERPRETER: _mutex.unlock(); // remove datamodel - if(!_userSuppliedDataModel) - _dataModel = DataModel(); +// if(!_userSuppliedDataModel) +// _dataModel = DataModel(); setInterpreterState(USCXML_FINISHED); return _state; @@ -1362,6 +1369,10 @@ void InterpreterImpl::reset() { _isInitialized = false; _stable = false; +#ifdef BUILD_PROFILING + timer = Timer(); +#endif + _dataModel = DataModel(); setInterpreterState(USCXML_INSTANTIATED); } |