bugfix
[oweals/gnunet.git] / src / util / configuration.c
index 4413b0377ff2af0533257d5044029a43080a3d2c..eacbdbf05eaa15ae08f2a9169e78020c55dd9014 100644 (file)
@@ -401,6 +401,24 @@ GNUNET_CONFIGURATION_get_value_number (struct GNUNET_CONFIGURATION_Handle
   return GNUNET_OK;
 }
 
+int
+GNUNET_CONFIGURATION_get_value_time (struct GNUNET_CONFIGURATION_Handle
+                                    *cfg, const char *section,
+                                    const char *option,
+                                    struct GNUNET_TIME_Relative *time)
+{
+  unsigned long long num;
+  int ret;
+
+  ret = GNUNET_CONFIGURATION_get_value_number (cfg,
+                                              section,
+                                              option,
+                                              &num);
+  if (ret == GNUNET_OK)
+    time->value = (uint64_t) num;
+  return ret;
+}
+
 int
 GNUNET_CONFIGURATION_get_value_string (struct GNUNET_CONFIGURATION_Handle
                                        *cfg, const char *section,