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: David Sugar
Subject: Re: (Sourceforge bug report) [ 617514 ] getElapsed()=getTimer() for WIN32
Date: Fri, 4 Oct 2002 08:09:17 -0400 (EDT)

Yes, I think so too...I missed noticing this one.

David

On Thu, 3 Oct 2002, Federico Montesino Pouzols wrote:

> 
>       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;
> >} 
> 
> 
> _______________________________________________
> Bug-commoncpp mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-commoncpp
> 





reply via email to

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