Browse Source

Merge branch 'master' into prism-pomdp

tempestpy_adaptions
Tim Quatmann 5 years ago
parent
commit
96309e1f11
  1. 2
      src/storm-cli-utilities/cli.cpp
  2. 21
      src/storm/utility/resources.h

2
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 we were given a time limit, we put it in place now.
if (resources.isTimeoutSet()) { if (resources.isTimeoutSet()) {
storm::utility::resources::setCPULimit(resources.getTimeoutInSeconds());
storm::utility::resources::setTimeoutAlarm(resources.getTimeoutInSeconds());
} }
// register signal handler to handle aborts // register signal handler to handle aborts

21
src/storm/utility/resources.h

@ -13,27 +13,6 @@ namespace storm {
namespace utility { namespace utility {
namespace resources { 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. * Get used CPU time.
* @return CPU time in seconds. * @return CPU time in seconds.

Loading…
Cancel
Save