mirror of
https://github.com/pocoproject/poco.git
synced 2025-03-01 10:57:56 +01:00
Use Clock instead of Timestamp which is inaccurate on multicode CPU.
Signed-off-by: FrancisANDRE <zosrothko@orange.fr>
This commit is contained in:
parent
3d029ea597
commit
0bb0361ffd
@ -16,7 +16,7 @@
|
|||||||
#include "Poco/TimedNotificationQueue.h"
|
#include "Poco/TimedNotificationQueue.h"
|
||||||
#include "Poco/Notification.h"
|
#include "Poco/Notification.h"
|
||||||
#include "Poco/Timestamp.h"
|
#include "Poco/Timestamp.h"
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
using Poco::TimedNotificationQueue;
|
using Poco::TimedNotificationQueue;
|
||||||
using Poco::Notification;
|
using Poco::Notification;
|
||||||
@ -71,13 +71,13 @@ void TimedNotificationQueueTest::testDequeue()
|
|||||||
assert (queue.size() == 0);
|
assert (queue.size() == 0);
|
||||||
pNf->release();
|
pNf->release();
|
||||||
|
|
||||||
Poco::Timestamp ts1;
|
Poco::Clock ts1;
|
||||||
ts1 += 100000;
|
ts1 += 100000;
|
||||||
Poco::Timestamp ts2;
|
Poco::Clock ts2;
|
||||||
ts2 += 200000;
|
ts2 += 200000;
|
||||||
Poco::Timestamp ts3;
|
Poco::Clock ts3;
|
||||||
ts3 += 300000;
|
ts3 += 300000;
|
||||||
Poco::Timestamp ts4;
|
Poco::Clock ts4;
|
||||||
ts4 += 400000;
|
ts4 += 400000;
|
||||||
|
|
||||||
queue.enqueueNotification(new QTestNotification("first"), ts1);
|
queue.enqueueNotification(new QTestNotification("first"), ts1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user