[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r18347 - gnunet/src/util
From: |
gnunet |
Subject: |
[GNUnet-SVN] r18347 - gnunet/src/util |
Date: |
Mon, 28 Nov 2011 16:21:02 +0100 |
Author: grothoff
Date: 2011-11-28 16:21:02 +0100 (Mon, 28 Nov 2011)
New Revision: 18347
Modified:
gnunet/src/util/service.c
gnunet/src/util/time.c
Log:
-document clock skew variable a bit more
Modified: gnunet/src/util/service.c
===================================================================
--- gnunet/src/util/service.c 2011-11-28 15:20:50 UTC (rev 18346)
+++ gnunet/src/util/service.c 2011-11-28 15:21:02 UTC (rev 18347)
@@ -1566,17 +1566,17 @@
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Service `%s' runs with configuration from `%s'\n", serviceName,
cfg_fn);
#endif
- if (GNUNET_OK ==
- GNUNET_CONFIGURATION_get_value_number (sctx.cfg, "testing",
"skew_offset",
- &skew_offset) &&
- (GNUNET_OK ==
- GNUNET_CONFIGURATION_get_value_number (sctx.cfg, "testing",
- "skew_variance",
&skew_variance)))
+ if ( (GNUNET_OK ==
+ GNUNET_CONFIGURATION_get_value_number (sctx.cfg, "TESTING",
"SKEW_OFFSET",
+ &skew_offset)) &&
+ (GNUNET_OK ==
+ GNUNET_CONFIGURATION_get_value_number (sctx.cfg, "TESTING",
+ "SKEW_VARIANCE",
&skew_variance)) )
{
clock_offset = skew_offset - skew_variance;
GNUNET_TIME_set_offset (clock_offset);
#if DEBUG_SERVICE
- LOG (GNUNET_ERROR_TYPE_DEBUG, "Skewing clock by %dll\n", clock_offset);
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "Skewing clock by %dll ms\n", clock_offset);
#endif
}
/* actually run service */
Modified: gnunet/src/util/time.c
===================================================================
--- gnunet/src/util/time.c 2011-11-28 15:20:50 UTC (rev 18346)
+++ gnunet/src/util/time.c 2011-11-28 15:21:02 UTC (rev 18347)
@@ -28,6 +28,9 @@
#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__)
+/**
+ * Variable used to simulate clock skew. Used for testing, never in
production.
+ */
static long long timestamp_offset;
/**
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r18347 - gnunet/src/util,
gnunet <=