summaryrefslogtreecommitdiff
path: root/src/app_thread.cpp
diff options
context:
space:
mode:
authorMartin Lucina <mato@kotelna.sk>2010-10-21 16:21:20 +0200
committerMartin Lucina <martin@lucina.net>2012-01-23 08:53:31 +0100
commit3f0085ddbef1a44b6bb7a0b23af497d56e0025fa (patch)
tree0adac3a5b31b2a1d9a89ec5a797f34c1a3fdf27a /src/app_thread.cpp
parent90d73cba9cd1d1724f38ed82fc0eefb1781c9c20 (diff)
parent2c416a793ea781273a5da6742211f5f01af13a2b (diff)
Imported Debian patch 2.0.10-1debian/2.0.10-1
Diffstat (limited to 'src/app_thread.cpp')
-rw-r--r--src/app_thread.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/app_thread.cpp b/src/app_thread.cpp
index ac59464..fc9bc1f 100644
--- a/src/app_thread.cpp
+++ b/src/app_thread.cpp
@@ -111,9 +111,11 @@ bool zmq::app_thread_t::process_commands (bool block_, bool throttle_)
#error
#endif
- // Check whether certain time have elapsed since last command
- // processing.
- if (current_time - last_processing_time <= max_command_delay)
+ // Check whether TSC haven't jumped backwards (in case of migration
+ // between CPU cores) and whether certain time have elapsed since
+ // last command processing. If it didn't do nothing.
+ if (current_time >= last_processing_time &&
+ current_time - last_processing_time <= max_command_delay)
return !terminated;
last_processing_time = current_time;
}