diff --git a/templates/normal/experiment.cpp b/templates/normal/experiment.cpp index ef06368..dd1d569 100644 --- a/templates/normal/experiment.cpp +++ b/templates/normal/experiment.cpp @@ -34,8 +34,8 @@ auto calculate_hyperperiod() -> long long } struct timestamps { - base_clock::time_point start; - base_clock::time_point end; + cpp_time_base::duration start; + cpp_time_base::duration end; int core_id = 0; }; @@ -59,12 +59,12 @@ void benchmark_out() std::cout << "executions " << taskset[i].count << std::endl; for(int j = 0; j < benchmark[i].size(); j++) { - auto start = base_clock::to_time_t(benchmark[i][j].start); - auto end = base_clock::to_time_t(benchmark[i][j].end); + auto task_start = benchmark[i][j].start.count(); + auto task_end = benchmark[i][j].end.count(); auto core_id = benchmark[i][j].core_id; std::cout << "instance " << j << " "; - std::cout << "start " << start << " "; - std::cout << "end " << end << " "; + std::cout << "start " << task_start << " "; + std::cout << "end " << end_task << " "; std::cout << "core_id " << core_id << std::endl; } } @@ -112,8 +112,8 @@ static void IdleTask(const void* args, mtapi_size_t, void*, mtapi_size_t, auto end_time = base_clock::now(); int core_id = sched_getcpu(); - benchmark[task_id][task_num - 1].start = start_time; - benchmark[task_id][task_num - 1].end = end_time; + benchmark[task_id][task_num - 1].start = duration_cast(start_time - start); + benchmark[task_id][task_num - 1].end = duration_cast(end_time - start); benchmark[task_id][task_num - 1].core_id = core_id; }