gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r13341 - in gnunet/src: include util


From: gnunet
Subject: [GNUnet-SVN] r13341 - in gnunet/src: include util
Date: Thu, 21 Oct 2010 11:40:33 +0200

Author: grothoff
Date: 2010-10-21 11:40:33 +0200 (Thu, 21 Oct 2010)
New Revision: 13341

Modified:
   gnunet/src/include/gnunet_load_lib.h
   gnunet/src/util/load.c
Log:
extended load api

Modified: gnunet/src/include/gnunet_load_lib.h
===================================================================
--- gnunet/src/include/gnunet_load_lib.h        2010-10-21 09:17:55 UTC (rev 
13340)
+++ gnunet/src/include/gnunet_load_lib.h        2010-10-21 09:40:33 UTC (rev 
13341)
@@ -56,6 +56,17 @@
 
 
 /**
+ * Change the value by which the load automatically declines.
+ *
+ * @param load load to update
+ * @param autodecline frequency of load decline
+ */
+void
+GNUNET_LOAD_value_set_decline (struct GNUNET_LOAD_Value *load,
+                              struct GNUNET_TIME_Relative autodecline);
+
+
+/**
  * Free a load value.
  *
  * @param lv value to free

Modified: gnunet/src/util/load.c
===================================================================
--- gnunet/src/util/load.c      2010-10-21 09:17:55 UTC (rev 13340)
+++ gnunet/src/util/load.c      2010-10-21 09:40:33 UTC (rev 13341)
@@ -128,6 +128,21 @@
 
 
 /**
+ * Change the value by which the load automatically declines.
+ *
+ * @param load load to update
+ * @param autodecline frequency of load decline
+ */
+void
+GNUNET_LOAD_value_set_decline (struct GNUNET_LOAD_Value *load,
+                              struct GNUNET_TIME_Relative autodecline)
+{
+  internal_update (load);
+  load->autodecline = autodecline;  
+}
+
+
+/**
  * Recalculate our load value.
  *
  * @param load load to update




reply via email to

[Prev in Thread] Current Thread [Next in Thread]