From 3f1fddc847bf1abca0e9497b82b560ce21162bd0 Mon Sep 17 00:00:00 2001 From: Sebastian Junges Date: Wed, 30 Sep 2020 20:27:48 -0700 Subject: [PATCH] add support for timeouts --- examples/analysis/05-analysis.py | 0 src/core/core.cpp | 6 ++++++ 2 files changed, 6 insertions(+) create mode 100644 examples/analysis/05-analysis.py diff --git a/examples/analysis/05-analysis.py b/examples/analysis/05-analysis.py new file mode 100644 index 0000000..e69de29 diff --git a/src/core/core.cpp b/src/core/core.cpp index ebf10f8..218c3e6 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -1,5 +1,6 @@ #include "core.h" #include "storm/utility/initialize.h" +#include "storm/utility/SignalHandler.h" #include "storm/io/DirectEncodingExporter.h" #include "storm/storage/ModelFormulasPair.h" #include "storm/storage/dd/DdType.h" @@ -26,6 +27,11 @@ void define_core(py::module& m) { m.def("_set_loglevel_trace", []() { storm::utility::setLogLevel(l3pp::LogLevel::TRACE); }); + + m.def("set_timeout", &storm::utility::resources::setTimeoutAlarm, py::arg("timeout"), "Set timeout in seconds"); + m.def("reset_timeout", &storm::utility::resources::resetTimeoutAlarm, "Reset timeout"); + m.def("install_signal_handlers", &storm::utility::resources::installSignalHandler); + } void define_parse(py::module& m) {