On Mon, Nov 05, 2001 at 04:15:34PM -0500, Glenn Maynard wrote:
> On Mon, Nov 05, 2001 at 04:41:34PM +0300, Alexander V. Lukyanov wrote:
> > Good thing to have, but it is quite boring to create.
>
> And difficult to be sure it's comprehensive.
>
> + TimeDiff status_interval(0,ResMgr::Query("cmd:status-interval", 0));
> + Time last_status;
>
> I'm still confused as to the point of a "difference of time" class; what
> is gained? Time is an amount of time (and acts as time of day using the
> standard epoch paradigm, storing time in terms of "amount of time".)
Time+TimeDiff is a time since epoch, Time+Time is not defined. That's the main
difference. Other difference is in the name, TimeDiff underlines that it is
not a time but amount of time.
Of course Time and TimeDiff can be encoded in time_t and an int, but this
does not make them equivalent. Maybe a lower level base class would be
useful here.
> Since Time is always an amount of time, that makes TimeDiff confusing--a
> data type that's effectively the difference of two numbers? That's like
> having separate (incompatible) time_t and time_diff_t data types, or int
> and int_diff. (Same thing, the latter just shows the problem more clearly.)
Would you argue that no classes consisting of a single int are needed?
> In any case, there *is* no TimeDiff class; CVS currently doesn't
> compile. Forget to commit something?
I have accidently committed some unfinished changes, will commit the rest later.
> Are you still finding Timer confusing? (Asking since you apparently
> removed its use.)
I decided to redo it, call methods differently and reset it manually.
--
Alexander.