From fbbda16ce5d06ebebc7d6eabdbd0769a3d886cb8 Mon Sep 17 00:00:00 2001 From: Andrew Stitcher Date: Fri, 23 Apr 2010 03:59:52 +0000 Subject: QPID-1904: Ensure that all timestamp uses are correctly relative to 1/1/1970 epoch. - Removed the hacky way to access the internal time value in AbsTime now that there is a defined AbsTime value EPOCH. - Changed all the code to use Duration(EPOCH, abtime) git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@937147 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qmf/engine/Agent.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cpp/src/qmf/engine/Agent.cpp') diff --git a/cpp/src/qmf/engine/Agent.cpp b/cpp/src/qmf/engine/Agent.cpp index fe9b84c565..7667213e5e 100644 --- a/cpp/src/qmf/engine/Agent.cpp +++ b/cpp/src/qmf/engine/Agent.cpp @@ -348,7 +348,7 @@ void AgentImpl::heartbeat() Buffer buffer(outputBuffer, MA_BUFFER_SIZE); Protocol::encodeHeader(buffer, Protocol::OP_HEARTBEAT_INDICATION); - buffer.putLongLong(uint64_t(Duration(now()))); + buffer.putLongLong(uint64_t(Duration(EPOCH, now()))); stringstream key; key << "console.heartbeat." << assignedBrokerBank << "." << assignedAgentBank; sendBufferLH(buffer, QMF_EXCHANGE, key.str()); @@ -484,7 +484,7 @@ void AgentImpl::raiseEvent(Event& event) Protocol::encodeHeader(buffer, Protocol::OP_EVENT_INDICATION); event.impl->encodeSchemaKey(buffer); - buffer.putLongLong(uint64_t(Duration(now()))); + buffer.putLongLong(uint64_t(Duration(EPOCH, now()))); event.impl->encode(buffer); string key(event.impl->getRoutingKey(assignedBrokerBank, assignedAgentBank)); -- cgit v1.2.1