----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviews.m5sim.org/r/425/#review735 -----------------------------------------------------------
Looks pretty good, and thanks! src/base/time.hh <http://reviews.m5sim.org/r/425/#comment997> Maybe define a constant for this? It's hard to count out that many zeros reliably. src/base/time.cc <http://reviews.m5sim.org/r/425/#comment998> Are you sure you want to use CLOCK_MONOTONIC here? My book says this is in reference to an "unspecified point in the past" and is for a clock source that can't jump around if, for instance, somebody updates the system time. There isn't necessarily anything wrong with that, but I don't think that's what gettimeofday does. If you want to really have a gettimeofday substitute, I think you want to use CLOCK_REALTIME, although that's mostly just a relatively uninformed interpretation of what's in the book and may be wrong. - Gabe On 2011-01-13 19:43:31, Nathan Binkert wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://reviews.m5sim.org/r/425/ > ----------------------------------------------------------- > > (Updated 2011-01-13 19:43:31) > > > Review request for Default, Ali Saidi, Gabe Black, Steve Reinhardt, and > Nathan Binkert. > > > Summary > ------- > > time: improve time datastructure > > Use posix clock functions (and librt) if it is available. > Inline a bunch of functions and implement more operators. > > I needed something like this for some timing code that I needed, so I just > did it right since I assume that Gabe could use this to better his patch. > > > Diffs > ----- > > SConstruct de7601e6e19d > src/base/time.hh de7601e6e19d > src/base/time.cc de7601e6e19d > src/sim/stat_control.cc de7601e6e19d > > Diff: http://reviews.m5sim.org/r/425/diff > > > Testing > ------- > > quick regressions pass > > > Thanks, > > Nathan > >
_______________________________________________ m5-dev mailing list m5-dev@m5sim.org http://m5sim.org/mailman/listinfo/m5-dev