136a137,138
> double defaultUnit = 1.0e-9;
>
155,156c157,161
< //XXX Assuming the time resolution is 1ps, and the default unit is 1ns.
< set(this, d, scale ? SC_NS : SC_PS);
---
> //XXX Assuming the time resolution is 1ps.
> if (scale)
> set(this, d * defaultUnit, SC_SEC);
> else
> set(this, d, SC_PS);
161,162c166,170
< //XXX Assuming the time resolution is 1ps, and the default unit is 1ns.
< set(this, static_cast<double>(v), scale ? SC_NS : SC_PS);
---
> //XXX Assuming the time resolution is 1ps.
> if (scale)
> set(this, static_cast<double>(v) * defaultUnit, SC_SEC);
> else
> set(this, static_cast<double>(v), SC_PS);
373c381
< sc_set_default_time_unit(double, sc_time_unit)
---
> sc_set_default_time_unit(double d, sc_time_unit tu)
375c383
< warn("%s not implemented.\n", __PRETTY_FUNCTION__);
---
> defaultUnit = d * TimeUnitScale[tu];
381,382c389
< warn("%s not implemented.\n", __PRETTY_FUNCTION__);
< return *(sc_time *)nullptr;
---
> return sc_time(defaultUnit, SC_SEC);