StopWatch activity
Benjamin M. Schwartz
bmschwar at fas.harvard.edu
Wed Nov 14 12:03:08 EST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
James Cameron wrote:
> On Wed, Nov 14, 2007 at 02:45:31AM -0500, Benjamin M. Schwartz wrote:
>> 2.5. Download: http://dev.laptop.org/~bemasc/StopWatchActivity-1.xo
>
> Tested on build 625 on a B4, works okay, problems you probably already
> know about:
>
> 1. the Start/Stop text legend disappears when the cursor is over it and
> the stopwatch is running, and the keyboard up and down arrows are used,
> perhaps just white text on white background,
Yep, white on white. Known bug.
> 2. the icons for the Start/Stop and Zero buttons are not there, perhaps
> these are in the later builds,
I made these icons myself. I just tested a clean install, using that .xo, and
they appear fine on joyride-269. This is probably due to changes in Sugar's
path behavior.
> 3. with the activity shared, but one XO active, stopping a stopwatch
> may result in a reduction of the displayed value, more likely to occur
> if all stopwatches are running,
This is actually a feature. It takes some time to process your mouse click, and
under heavier CPU load, that time may be long enough that the time label
continues to redraw before it can be stopped. However, the first thing the code
does upon receiving your mouse click is to record the time-of-click, which is
what is used to determine the displayed value. Thus, the negative change you
can see (if you have very fast eyes) is just a correction for the computer's own
reaction time.
To understand the motivation for this feature, imagine if the processing delay
included several mesh hops, or even a satellite link. In this case, it might
take several seconds for the fact that person A has pressed stop to propagate to
person B. When that message arrives, person B's clock must be stopped and set
back by the propagation delay, in order to make the two clocks agree. StopWatch
does this by passing around absolute reference times with every event.
> My opinion is that the number of significant digits should be
> selectable, and a younger kids version could have a single stopwatch
> with a bar graph, stopwatch clock face, and digital display.
Every digital stopwatch I have ever seen has precision to hundredths of a
second, no more and no less. In this case, more would be infeasible, due to the
coarseness of software timing. Less would be pessimistic. To be clear, I am
really trying to duplicate the interface and functionality of a standard digital
stopwatch, except where I think it can be improved.
I don't know what you mean by a bar graph. Younger children can't read analog
clocks (I recall being taught how to read them in second grade). Also, drawing
clock faces is computationally expensive.
- --Ben
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHOypMUJT6e6HFtqQRAuxhAKCTcfqnyvfkzXjpmZkF8HSysXf7OACgoK2M
ZfQovLMmlalL8r4s8ohRVkE=
=QDY8
-----END PGP SIGNATURE-----
More information about the Devel
mailing list