StopWatch activity

Benjamin M. Schwartz bmschwar at fas.harvard.edu
Wed Nov 14 17:35:23 EST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hal Murray wrote:
>> Obsessive accuracy.
> What's your version of "Obsessive"?  Seconds?  Milliseconds?  Microseconds?
I have no desire to do better than 0.01s.  Human reaction times are an order of
magnitude slower than that anyway.
What I meant is, I have done everything I could think of to maximize accuracy,
and this is obvious in the way the code is structured.  For example, the first
instruction in each user-interface callback records the event time, before any
processing is done, to minimize computation delay.

> Are you assuming that the clocks on various XOs are synchronized?  If so, how
> well?
No.  Upon joining, a new member asks everyone else what time they think it is.
The algorithm assumes that the network delay is the same in each direction.
Whoever responds first "wins", because this computer experienced the least
network+scheduling delay, and so the assumption is most likely to be true.
Experimentally, this works very well with two nodes on a mesh; that's about all
I can test at the moment.

A more sophisticated synchronization algorithm would be appreciated, but I did
not know how to make NTP work:
1. From python
2. As a highly restricted non-root user
3. Over Tubes
4. In a way that is resilient to the sudden disappearance of any member of the
group.

TamTam developers: I would like to know how you do synchronization.  I looked
through your git repository, but I couldn't find any C source for it.

> [Long discussion to follow in a separate messsage.]
?

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHO3grUJT6e6HFtqQRAvTVAJ9QewEBavAaUz+LSGygTjkljJsb3QCfS8Gk
ykQYi9Jefr/CZDT9ESuxEm4=
=+KNe
-----END PGP SIGNATURE-----



More information about the Devel mailing list