Re: Lahman, how ya doing?
- From: "H. S. Lahman" <h.lahman@xxxxxxxxxxx>
- Date: Tue, 26 Apr 2005 16:14:04 GMT
Responding to Hansen...
I'd started with a Timer class that keeps the total time separately in each individual instantiation, but I thought that wasn't quite logically representative since there's only one time. I thought it still wasn't worthwhile changing that until I realized that main() was pretty much doing what I'd have Clock doing anyway.
As you noted, you only need one timer if you have different events for different frequencies. The timer just spits out the right event after the proper number of internal "ticks". If you use a single FIFO event queue, then the ordering of operations will Just Work.
But that leaves the problem of "registering" the right receivers for those events so that Timer can address them correctly. Since there is nothing dynamic about that assignment, I agree with Martin that it seems like something timer.add would do. [If the listener assignments were more dynamic in nature a pattern like Observer might be relevant.]
************* There is nothing wrong with me that could not be cured by a capful of Drano.
H. S. Lahman hsl@xxxxxxxxxxxxxxxxx Pathfinder Solutions -- Put MDA to Work http://www.pathfindermda.com blog: http://pathfinderpeople.blogs.com/hslahman (888)OOA-PATH
.
- Follow-Ups:
- Re: Lahman, how ya doing?
- From: Gregory L. Hansen
- Re: Lahman, how ya doing?
- References:
- Lahman, how ya doing?
- From: Gregory L. Hansen
- Lahman, how ya doing?
- Prev by Date: Who can find this paper on the net?
- Next by Date: Re: Who can find this paper on the net?
- Previous by thread: Re: Lahman, how ya doing?
- Next by thread: Re: Lahman, how ya doing?
- Index(es):