"Log can be expensive" => I have tried to run the same code with a
good old "System.out.println" and the problem is still there.

On Jul 25, 7:35 pm, Christophe <[email protected]>
wrote:
> thanks for your response Nick.
>
> The only code in "onTick" is the call to "Log.i()". I don't think it
> take more than a second to execute :)
> What is "debug symbol" anyways ??
>
> On Jul 24, 10:43 pm, Nick Risaro <[email protected]> wrote:
>
>
>
>
>
>
>
> > The calls to *onTick* are synchronized, maybe your code is taking more than
> > a second to execute. Log can be expensive, and with debug symbols enabled
> > your code will run a little bit slower than in real life.
>
> > Or maybe the end of times is close!! :P
>
> > On Sun, Jul 24, 2011 at 2:30 PM, Christophe <
>
> > [email protected]> wrote:
> > > Run the following code in the emulator and start a chronometer at the
> > > same time :
>
> > > // log some text each second :
> > > CountDownTimer countDown = new CountDownTimer(Integer.MAX_VALUE, 1000)
> > > {
> > >                private int i = 0;
> > >                @Override
> > >                public void onTick(long millisUntilFinished) {
> > >                                Log.i("####", "###" + i);
> > >                                i++;
> > >                }
> > >                @Override
> > >                public void onFinish() {}
> > > };
>
> > > countDown.start();
>
> > > Then wait a few minutes.
> > > For example I stop when my chronometer was at 7min44s. The value in
> > > the log was 448seconds => 7min28s.
>
> > > WTF ?!???
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to [email protected]
> > > To unsubscribe from this group, send email to
> > > [email protected]
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to