|
Boost Users : |
Subject: Re: [Boost-users] [Timer] Using progress timers
From: Alex Perry (Alex.Perry_at_[hidden])
Date: 2011-09-21 07:23:42
On Wed, 21 Sep 2011 11:47:35 +0100 Robert Jones wrote:-
> cat progress.cpp
>
> #include <boost/progress.hpp>
>
> int main( )
> {
> boost::progress_timer t;
>
> sleep( 5 );
>
> return 0;
> }
>
> > g++ progress.cpp
>
> > ./a.out
> 0.00 s
>
> I was expecting a number >= 5.00 s! What am I missing?
Not sure if its any help but above does work on windows with appropriate change to sleep
>type test.cpp
#include <boost/progress.hpp>
#include <windows.h>
int main( )
{
boost::progress_timer t;
Sleep( 5000 );
return 0;
}
>cl test.cpp
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
test.cpp
Microsoft (R) Incremental Linker Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
/out:test.exe
test.obj
C:\workspace\Test>test
5.00 s
HTH Alex
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net