diff options
author | Benoit Foucher <benoit@zeroc.com> | 2007-11-27 11:58:35 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2007-11-27 11:58:35 +0100 |
commit | 47f800495093fd7679a315e2d730fea22f6135b7 (patch) | |
tree | a7b8d3488f3841367dd03d10cae293f36fd10481 /cpp/test/IceUtil/timer/Client.cpp | |
parent | Fixed SystemException to no longer derive from LocalException (diff) | |
download | ice-47f800495093fd7679a315e2d730fea22f6135b7.tar.bz2 ice-47f800495093fd7679a315e2d730fea22f6135b7.tar.xz ice-47f800495093fd7679a315e2d730fea22f6135b7.zip |
- Added support for non-blocking AMI/batch requests, connection
creation.
- Added support for AMI oneway requests.
- Changed collocation optimization to not perform any DNS lookups.
Diffstat (limited to 'cpp/test/IceUtil/timer/Client.cpp')
-rw-r--r-- | cpp/test/IceUtil/timer/Client.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/cpp/test/IceUtil/timer/Client.cpp b/cpp/test/IceUtil/timer/Client.cpp index 382a95175d1..d1e4a2ed474 100644 --- a/cpp/test/IceUtil/timer/Client.cpp +++ b/cpp/test/IceUtil/timer/Client.cpp @@ -28,7 +28,7 @@ public: } virtual void - run() + runTimerTask() { Lock sync(*this); ++_count; @@ -83,6 +83,13 @@ public: } } + void + clear() + { + _run = IceUtil::Time(); + _count = 0; + } + private: IceUtil::Time _run; @@ -101,19 +108,20 @@ int main(int argc, char* argv[]) TestTaskPtr task = new TestTask(); timer->schedule(task, IceUtil::Time()); task->waitForRun(); + task->clear(); while(true) { - TestTaskPtr task = new TestTask(); - timer->schedule(task, IceUtil::Time::milliSeconds(-10)); try { + timer->schedule(task, IceUtil::Time::milliSeconds(-10)); timer->schedule(task, IceUtil::Time()); - test(task->hasRun()); } catch(const IceUtil::IllegalArgumentException&) { break; } + task->waitForRun(); + task->clear(); } } |