about summary refs log tree commit diff
path: root/src/libstore/globals.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/globals.cc')
-rw-r--r--src/libstore/globals.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc
index e8c033db2ec1..b0316f77c292 100644
--- a/src/libstore/globals.cc
+++ b/src/libstore/globals.cc
@@ -24,6 +24,7 @@ Verbosity buildVerbosity = lvlInfo;
 unsigned int maxBuildJobs = 1;
 bool readOnlyMode = false;
 string thisSystem = "unset";
+unsigned int maxSilentTime = 0;
 
 
 static bool settingsRead = false;
@@ -104,5 +105,14 @@ bool queryBoolSetting(const string & name, bool def)
         % name % v);
 }
 
+
+unsigned int queryIntSetting(const string & name, unsigned int def)
+{
+    int n;
+    if (!string2Int(querySetting(name, int2String(def)), n) || n < 0)
+        throw Error(format("configuration setting `%1%' should have an integer value") % name);
+    return n;
+}
+
  
 }