diff --git a/src/storm/utility/Stopwatch.cpp b/src/storm/utility/Stopwatch.cpp index f694df496..b863c8da5 100644 --- a/src/storm/utility/Stopwatch.cpp +++ b/src/storm/utility/Stopwatch.cpp @@ -55,6 +55,11 @@ namespace storm { isStopped = true; } + void Stopwatch::restart() { + reset(); + start(); + } + bool Stopwatch::stopped() const { return isStopped; } diff --git a/src/storm/utility/Stopwatch.h b/src/storm/utility/Stopwatch.h index e3b41f4e9..c90bd8c7e 100644 --- a/src/storm/utility/Stopwatch.h +++ b/src/storm/utility/Stopwatch.h @@ -66,6 +66,11 @@ namespace storm { */ void reset(); + /*! + * Reset the stopwatch and immediately start it + */ + void restart(); + /*! * Retrieves whether the watch is stopped. */