nathan binkert wrote:
>
>     If you add a function for it I'll use it. We should be careful, though, 
> since when nanoseconds (or microseconds or milliseconds) spill into seconds 
> might get a little tricky. Actually, right now nanoseconds, microseconds, and 
> milliseconds all change the same data, but seconds are separate. That might 
> not be obvious to somebody not in the know.
>
>
> I was more thinking of accepting Ticks directly, instead of taking
> nanoseconds (i.e. dealing with Int::ns in the function).  We could
> make a version of set() that just takes Ticks.  set() is separate from
> sec() and nsec().  Though perhaps that is confusing.
>
> What if, instead of doing it in base/time.hh, we did in sim/core.hh?
>  We could just have some stand alone function that takes Ticks and
> turns it into Time by properly using Int::ns.  
>
> The alternative is to use Float::s and use the version of set() that
> takes a double.  I think it would simply be set(p->time_sync_period *
> SimClock::Float::s).  That feels a bit kludgy though.
>
>   Nate
> ------------------------------------------------------------------------
>
> _______________________________________________
> m5-dev mailing list
> m5-dev@m5sim.org
> http://m5sim.org/mailman/listinfo/m5-dev
>   

Yeah, I tried to stay away from using double since it can be imprecise.
To me it makes more sense to put a conversion function in base/time.hh
since Ticks seem like the more fundamental thing. Maybe it's as simple
as adding a setTick?

Gabe
_______________________________________________
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to