X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/dccf1b41e9c7b5a696f01abceaa2779fe65f154f..6037e77219716e9d65b76de68c40a4176278dd56:/include/simgrid/chrono.hpp diff --git a/include/simgrid/chrono.hpp b/include/simgrid/chrono.hpp index d3759cad03..84bbd2b868 100644 --- a/include/simgrid/chrono.hpp +++ b/include/simgrid/chrono.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2016-2021. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -15,7 +15,7 @@ #include #include -#include +#include namespace simgrid { @@ -37,16 +37,14 @@ namespace simgrid { * @endcode * */ -struct SimulationClock { +class SimulationClock { +public: using rep = double; using period = std::ratio<1>; using duration = std::chrono::duration; using time_point = std::chrono::time_point; static constexpr bool is_steady = true; - static time_point now() - { - return time_point(duration(SIMIX_get_clock())); - } + static time_point now() { return time_point(duration(simgrid_get_clock())); } }; /** Default duration for simulated time */