]> git.stg.codes - stg.git/blobdiff - stglibs/conffiles.lib/conffiles.cpp
Ticket 37. The timeout variable added, if(stgTime > timeout && timeout
[stg.git] / stglibs / conffiles.lib / conffiles.cpp
index ed2e4447744679b8e9bc2928018198b5f03c9ec8..a9c3e555093a87e8e60cc7c7d946cfdf347865b8 100644 (file)
@@ -35,6 +35,7 @@
 
 #include <cerrno> // E*
 #include <cstring>
+#include <sstream>
 #include <cstdlib>
 #include <cstdio>
 
@@ -345,6 +346,14 @@ param_val[param] = buf;
 changed = true;
 }
 //---------------------------------------------------------------------------
+void CONFIGFILE::WriteTime(const std::string & param, time_t val)
+{
+std::stringstream ss;
+ss<<val;
+param_val[param] = ss.str();
+changed = true;
+}
+//---------------------------------------------------------------------------
 int CONFIGFILE::ReadDouble(const std::string & param, double * val, double defaultVal) const
 {
 const std::map<std::string, std::string, StringCaseCmp_t>::const_iterator it(param_val.find(param));