From 4eed592811ae61e2ed6eb69acc3bef5a3c071000 Mon Sep 17 00:00:00 2001
From: Tim Quatmann <tim.quatmann@cs.rwth-aachen.de>
Date: Mon, 27 Apr 2020 11:39:07 +0200
Subject: [PATCH] --timeout now just sends a SIGALRM signal (which can be
 catched by the signal handler).

---
 src/storm-cli-utilities/cli.cpp |  2 +-
 src/storm/utility/resources.h   | 21 ---------------------
 2 files changed, 1 insertion(+), 22 deletions(-)

diff --git a/src/storm-cli-utilities/cli.cpp b/src/storm-cli-utilities/cli.cpp
index 12d5771bd..9105bc9a2 100644
--- a/src/storm-cli-utilities/cli.cpp
+++ b/src/storm-cli-utilities/cli.cpp
@@ -202,7 +202,7 @@ namespace storm {
             
             // If we were given a time limit, we put it in place now.
             if (resources.isTimeoutSet()) {
-                storm::utility::resources::setCPULimit(resources.getTimeoutInSeconds());
+                storm::utility::resources::setTimeoutAlarm(resources.getTimeoutInSeconds());
             }
 
             // register signal handler to handle aborts
diff --git a/src/storm/utility/resources.h b/src/storm/utility/resources.h
index eb84d73c0..349796acd 100644
--- a/src/storm/utility/resources.h
+++ b/src/storm/utility/resources.h
@@ -13,27 +13,6 @@ namespace storm {
     namespace utility {
         namespace resources {
 
-            /*!
-             * Get CPU limit.
-             * @return CPU limit in seconds.
-             */
-            inline std::size_t getCPULimit() {
-                rlimit rl;
-                getrlimit(RLIMIT_CPU, &rl);
-                return rl.rlim_cur;
-            }
-
-            /*!
-             * Set CPU limit.
-             * @param seconds CPU limit in seconds.
-             */
-            inline void setCPULimit(std::size_t seconds) {
-                rlimit rl;
-                getrlimit(RLIMIT_CPU, &rl);
-                rl.rlim_cur = seconds;
-                setrlimit(RLIMIT_CPU, &rl);
-            }
-
             /*!
              * Get used CPU time.
              * @return CPU time in seconds.