Skip to content

Commit

Permalink
Fixed implicit conversion issue while using add_time function
Browse files Browse the repository at this point in the history
Signed-off-by: Vedant <vedantnimjed@gmail.com>
  • Loading branch information
vrnimje committed Apr 22, 2024
1 parent 2f60c37 commit 2575d63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/core/testing/src/performance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ average: {{average(elapsed)}}{{^-last}}
}

void add_time(std::string const& test_name, std::string const& executor,
double time)
long double time)
{
times().add(test_name, executor, time);
}
Expand Down Expand Up @@ -242,7 +242,7 @@ average: {{average(elapsed)}}{{^-last}}
test();
// default is in seconds
auto time =
std::chrono::duration_cast<std::chrono::duration<double>>(
std::chrono::duration_cast<std::chrono::duration<long double>>(
timer::now() - start);
detail::add_time(name, exec, time.count());
}
Expand Down

0 comments on commit 2575d63

Please sign in to comment.