activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Mittler" <nathan.mitt...@gmail.com>
Subject Re: about setCMSExpiration
Date Tue, 28 Nov 2006 11:20:14 GMT
#include <sys/timeb.h>
...
struct timeb t;
ftime (&t);
long timeStamp = (t.time * 1000LL) + t.millitm;

This should give you the current time in epoch milliseconds.  Although the
resolution on the windows clock is really aweful - it only changes around
every 10ms.

One more thing - you should not call the setCMSExpiration explicitly.  You
want to call the setTimeToLive in the MessageProducer.

On 11/28/06, sgliu <shengguo@sina.com> wrote:
>
>
> In function Message::setCMSExpiration( long  expireTime ),
> expireTime = timeToLive + timeStamp;
> In JAVA : long timeStamp = System.currentTimeMillis();
>
> In Vusual C++, I don't konw the parameter " timeStamp " how obtain?
> Please help me.
> Thank you.
>
> --
> View this message in context:
> http://www.nabble.com/about-setCMSExpiration-tf2717312.html#a7576201
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message