Converting Duration to TickDuration
Vladimir Panteleev
vladimir at thecybershadow.net
Tue Sep 13 05:45:27 PDT 2011
On Tue, 13 Sep 2011 06:27:44 +0300, Jonathan M Davis <jmdavisProg at gmx.com>
wrote:
> Personally, I'd just Duration far those and not TickDuration. Duration
> is just
> as precise (if not more precise) than TickDuration as long as the system
> ticks
> aren't less than 1 hnsec apart. TickDuration is useful in that it gives
> you
> timing in clock ticks if you need it (e.g. if the system clocks ticks
> were
> faster than 1 ever 1 hnsecs), but in the general case, it doesn't buy you
> anything over Duration, and I don't see why it would in your case either.
> Maybe something in how you're doing events?
Well, TickDuration.currSystemTick() returns a TickDuration, so I went with
that all across. I'll be needing to do some conversions at one point or
another, though optimally it'd happen when creating events, and not when
processing them, as that would have less total overhead.
--
Best regards,
Vladimir mailto:vladimir at thecybershadow.net
More information about the Digitalmars-d-learn
mailing list