gnokii-users
[Top][All Lists]
Advanced

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

Re: Timing in FBUS_Initialise()


From: Pavel Machek
Subject: Re: Timing in FBUS_Initialise()
Date: Mon, 3 Jun 2002 19:13:33 +0200
User-agent: Mutt/1.3.28i

Hi!

> > > ==============================================
> > > struct timeval t0,t1,t2;
> > > ...
> > > gettimeofday(&t0,NULL);
> > >   // for (count = 0; count < glink->InitLength; count++) {
> > >   for (count = 0; count < 10; count++) {
> > >           // usleep(100);
> > >           usleep(20000L);
> > >           device_write(&init_char, 1);
> > >   }
> > 
> > usleep sleeps 10msec minimum. do busy-loop with gettimeofday.
> 
> Exactly -- that is just what I found (and said).
> 
> My point was (in part) that there is a note in the gnokii code
> to say that the timing (using usleep(100)) is "empirical",
> which I took to mean the result of experiment.
> 
> However, this is rather misleading if my computer is typical,
> as it would make no difference if the 100 were replaced
> by any number from 1 to 10000.

It should be replaced with 10000.

> My query arose because I re-wrote part of gnokii in Java,
> but have yet to get any response from my phone.
> I thought this was due to the fact that I could not reduce
> the timing to 100 microseconds --
> but now realise the cause must be sought elsewhere.

Java gnokii? Wow ;-). What is it good for?

[I thought about putting gnokii into J2ME on sl45i to be able to send
picture messages, but that was rather perverted dream ;-)].
                                                                        Pavel
-- 
(about SSSCA) "I don't say this lightly.  However, I really think that the U.S.
no longer is classifiable as a democracy, but rather as a plutocracy." --hpa



reply via email to

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