diff options
author | couriersud <couriersud@gmx.org> | 2020-01-12 17:16:25 +0100 |
---|---|---|
committer | couriersud <couriersud@gmx.org> | 2020-01-12 17:16:25 +0100 |
commit | 9d7cbcaa4006f7c6dea32fdf29b2c8cce094b895 (patch) | |
tree | 918d2ca6d325e21599a39d00bc4d08f709704230 /src/lib/netlist/prg/nltool.cpp | |
parent | 07f26f8e066d20acc39517ffc9ba65619981f757 (diff) |
netlist: Code maintenance. (nw)
Introduce an additional absolute time type netlist_time_ext to identify
whether absolute or relative time is used in the netlist code.
Extend ptime code to allow operations between ptime derived types with
different internal types.
In addition rewrote main queue serve loops. Adds a very small
performance increase.
Diffstat (limited to 'src/lib/netlist/prg/nltool.cpp')
-rw-r--r-- | src/lib/netlist/prg/nltool.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/netlist/prg/nltool.cpp b/src/lib/netlist/prg/nltool.cpp index f19cd2a339c..b6594b02d79 100644 --- a/src/lib/netlist/prg/nltool.cpp +++ b/src/lib/netlist/prg/nltool.cpp @@ -323,7 +323,7 @@ struct input_t if (e != 3) plib::pthrow<netlist::nl_exception>(plib::pfmt("error {1} scanning line {2}\n")(e)(line)); m_value = static_cast<nl_fptype>(val); - m_time = netlist::netlist_time::from_fp(t); + m_time = netlist::netlist_time_ext::from_fp(t); m_param = setup.find_param(pstring(buf.data()), true); } @@ -346,7 +346,7 @@ struct input_t } } - netlist::netlist_time m_time; + netlist::netlist_time_ext m_time; netlist::param_t *m_param; nl_fptype m_value; }; @@ -377,7 +377,7 @@ void tool_app_t::run() { plib::chrono::timer<plib::chrono::system_ticks> t; std::vector<input_t> inps; - netlist::netlist_time ttr; + netlist::netlist_time_ext ttr; netlist_tool_t nt(*this, "netlist"); { @@ -398,7 +398,7 @@ void tool_app_t::run() nt.exec().reset(); inps = read_input(nt.setup(), opt_inp()); - ttr = netlist::netlist_time::from_fp(opt_ttr()); + ttr = netlist::netlist_time_ext::from_fp(opt_ttr()); } @@ -406,7 +406,7 @@ void tool_app_t::run() t.reset(); - netlist::netlist_time nlt = nt.exec().time(); + netlist::netlist_time_ext nlt = nt.exec().time(); { auto t_guard(t.guard()); |