Deleted Added
sdiff udiff text old ( 13149:91e215a2da78 ) new ( 13151:5ce517287782 )
full compact
1/*
2 * Copyright 2018 Google, Inc.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met: redistributions of source code must retain the above copyright
7 * notice, this list of conditions and the following disclaimer;
8 * redistributions in binary form must reproduce the above copyright

--- 357 unchanged lines hidden (view full) ---

366 return os;
367}
368
369const sc_time SC_ZERO_TIME;
370
371void
372sc_set_time_resolution(double d, sc_time_unit tu)
373{
374 if (d < 0.0) {
375 SC_REPORT_ERROR("(E514) set time resolution failed",
376 "value not positive");
377 }
378 double dummy;
379 if (modf(log10(d), &dummy) != 0.0) {
380 SC_REPORT_ERROR("(E514) set time resolution failed",
381 "value not a power of ten");
382 }

--- 38 unchanged lines hidden (view full) ---

421{
422 static const sc_time MaxScTime = sc_time::from_value(MaxTick);
423 return MaxScTime;
424}
425
426void
427sc_set_default_time_unit(double d, sc_time_unit tu)
428{
429 defaultUnit = d * TimeUnitScale[tu];
430}
431
432sc_time
433sc_get_default_time_unit()
434{
435 return sc_time(defaultUnit, SC_SEC);
436}
437

--- 41 unchanged lines hidden ---