systemc: Add a non-standard sc_time constructor and from_string.
authorGabe Black <gabeblack@google.com>
Thu, 27 Sep 2018 08:20:28 +0000 (01:20 -0700)
committerGabe Black <gabeblack@google.com>
Tue, 16 Oct 2018 00:38:49 +0000 (00:38 +0000)
commit34a9b8628f2a0b001a57deed73f887c92d5ffef6
tree89f1732dfcf980e5b1c30c7355999cded6c1c90a
parent5bdeb1a432430dcb265cef77fa9365eceddce7d7
systemc: Add a non-standard sc_time constructor and from_string.

The sc_time constructor was being called, but because of implicit type
conversions, a const char * was being treated as a bool and totally
unrelated constructor was being called.

This change adds and implements the missing but non-standard
constructor. It also implements the from_string function which uses
that constructor.

Change-Id: I21e7e40fd1a8d1c579b1abdc2036d016501f510c
Reviewed-on: https://gem5-review.googlesource.com/c/13191
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
src/systemc/core/sc_time.cc
src/systemc/core/time.cc
src/systemc/core/time.hh
src/systemc/ext/core/sc_time.hh