In the ?¬?rst way, the platform
would just respond with the current time when asked, and we could store that and then
later ask again for the new time and calculate the difference. In the second way, the
platform could offer a service to create a new timer, which it would then continuously
update. While the second way would make modeling the stopwatch easier, it seemed
unlikely in the resource constrained embedded environment of a digital wristwatch:
updating multiple timers simultaneously would place unnecessary demands on
processing power and battery life. We would, therefore, need a way of representing
subtraction of time variables, and most likely addition too.
Thinking about other watch applications such as the alarm clock, it appeared there
might be a need for another time operation. When editing the alarm time, pressing Up
would increment (say) the minutes, which could be represented as adding one minute.
However, when the minutes reached 59, the next press of Up would take them to 00,
without incrementing the hours. In other words, this was not a true increment of
adding one minute, but rather an increment to just one unit of the whole time, which
would roll around at either end of the unit??™s range. This could have been represented in
the models with a comparison operator and an subtraction, for example: ???if minutes
equals 60 then subtract 60 from minutes.
Pages:
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366