10#include <scp/report.h>
11#include <cci_configuration>
13#include <module_factory_registery.h>
25SC_MODULE (timeprinter) {
27 cci::cci_param<uint64_t> interval_us;
28 SC_CTOR (timeprinter) : interval_us(
"interval_us",1000000,
"Interval between printing in microseconds")
30 SC_THREAD(print_time_stamp);
33 void print_time_stamp()
35 auto startRT = std::chrono::high_resolution_clock::now();
38 sc_core::sc_time now = sc_core::sc_time(std::chrono::duration_cast<std::chrono::microseconds>(
39 std::chrono::high_resolution_clock::now() - startRT)
43 SCP_INFO(())(
"time stamp real time: {:.6}s", now.to_seconds());
44 sc_core::wait(interval_us, sc_core::SC_US);
49extern "C" void module_register();