bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (Sourceforge bug report) [ 617514 ] getElapsed()=getTimer() for WIN3


From: Federico Montesino Pouzols
Subject: Re: (Sourceforge bug report) [ 617514 ] getElapsed()=getTimer() for WIN32
Date: Thu, 3 Oct 2002 20:04:56 +0200
User-agent: Mutt/1.4i

        Hi, I think your proposal makes much more sense that the
current code. It looks like this method has been overlooked so far,
so, if there is no objection, this will be incorporated for the next
release.

>For WIN32, TimerPort::getElapsed() returns getTimer().
>timeout_t TimerPort::getElapsed(void) const
>{
>return getTimer();
>}
>
>The following code is proposed, for WIN32:
>timeout_t TimerPort::getElapsed(void) const
>{
>DWORD now;
>long diff;
>
>if(!active)
>return TIMEOUT_INF;
>
>now = GetTickCount();
>diff = now - timer;
>
>if(diff < 0)
>return 0l;
>
>return diff;
>} 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]