aboutsummaryrefslogtreecommitdiff
path: root/src/regex
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-08-11 21:21:56 +0000
committerChristian Grothoff <christian@grothoff.org>2013-08-11 21:21:56 +0000
commit3d7fefedc9ba60bd8e8448efe8b628446d958536 (patch)
tree61ce41a52cd6e7232cead77818ef265993b2427e /src/regex
parent4a0398474db197abed243a123fb971fbeeffab4b (diff)
downloadgnunet-3d7fefedc9ba60bd8e8448efe8b628446d958536.tar.gz
gnunet-3d7fefedc9ba60bd8e8448efe8b628446d958536.zip
changing time measurement from milliseconds to microseconds
Diffstat (limited to 'src/regex')
-rw-r--r--src/regex/gnunet-daemon-regexprofiler.c4
-rw-r--r--src/regex/plugin_block_regex.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/regex/gnunet-daemon-regexprofiler.c b/src/regex/gnunet-daemon-regexprofiler.c
index d4c9cb7cb..86f7d451b 100644
--- a/src/regex/gnunet-daemon-regexprofiler.c
+++ b/src/regex/gnunet-daemon-regexprofiler.c
@@ -179,10 +179,10 @@ reannounce_regex (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
179 } 179 }
180 180
181 random_delay = 181 random_delay =
182 GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, 182 GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MICROSECONDS,
183 GNUNET_CRYPTO_random_u32 ( 183 GNUNET_CRYPTO_random_u32 (
184 GNUNET_CRYPTO_QUALITY_WEAK, 184 GNUNET_CRYPTO_QUALITY_WEAK,
185 reannounce_period_max.rel_value)); 185 reannounce_period_max.rel_value_us));
186 reannounce_task = GNUNET_SCHEDULER_add_delayed (random_delay, 186 reannounce_task = GNUNET_SCHEDULER_add_delayed (random_delay,
187 &reannounce_regex, cls); 187 &reannounce_regex, cls);
188} 188}
diff --git a/src/regex/plugin_block_regex.c b/src/regex/plugin_block_regex.c
index 317f65d8d..681ade880 100644
--- a/src/regex/plugin_block_regex.c
+++ b/src/regex/plugin_block_regex.c
@@ -177,7 +177,7 @@ evaluate_block_regex_accept (void *cls, enum GNUNET_BLOCK_Type type,
177 GNUNET_break_op(0); 177 GNUNET_break_op(0);
178 return GNUNET_BLOCK_EVALUATION_RESULT_INVALID; 178 return GNUNET_BLOCK_EVALUATION_RESULT_INVALID;
179 } 179 }
180 if (0 == GNUNET_TIME_absolute_get_remaining (GNUNET_TIME_absolute_ntoh (rba->expiration_time)).rel_value) 180 if (0 == GNUNET_TIME_absolute_get_remaining (GNUNET_TIME_absolute_ntoh (rba->expiration_time)).rel_value_us)
181 { 181 {
182 /* technically invalid, but can happen without an error, so 182 /* technically invalid, but can happen without an error, so
183 we're nice by reporting it as a 'duplicate' */ 183 we're nice by reporting it as a 'duplicate' */