The time resolution won't yet be fixed, so the scaling factor will
still be set to zero.
Change-Id: I1d1e58316ee05cc477a31ce90e2bbf56dcbc65c3
Reviewed-on: https://gem5-review.googlesource.com/12255
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
static sc_time tstamp;
Tick tick = ::sc_gem5::scheduler.getCurTick();
//XXX We're assuming the systemc time resolution is in ps.
- tstamp = sc_time::from_value(tick / SimClock::Int::ps);
+ // If tick is zero, the time scale may not be fixed yet, and
+ // SimClock::Int::ps may be zero.
+ tstamp = sc_time::from_value(tick ? tick / SimClock::Int::ps : 0);
return tstamp;
}