aboutsummaryrefslogtreecommitdiff
path: root/src/regex
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2013-03-15 11:48:35 +0000
committerBart Polot <bart@net.in.tum.de>2013-03-15 11:48:35 +0000
commitbbe5202e0723144b7d615d51ed909aafb2aa6175 (patch)
treeb278cbccd1665299ace3f6a12403a9a92d0837a9 /src/regex
parente305310255597e3ef50f842cee0aa304973b9005 (diff)
downloadgnunet-bbe5202e0723144b7d615d51ed909aafb2aa6175.tar.gz
gnunet-bbe5202e0723144b7d615d51ed909aafb2aa6175.zip
- use constants for delays
Diffstat (limited to 'src/regex')
-rw-r--r--src/regex/gnunet-regex-profiler.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/regex/gnunet-regex-profiler.c b/src/regex/gnunet-regex-profiler.c
index 8a5a1517d..91281e439 100644
--- a/src/regex/gnunet-regex-profiler.c
+++ b/src/regex/gnunet-regex-profiler.c
@@ -38,6 +38,12 @@
38 38
39#define FIND_TIMEOUT GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 90) 39#define FIND_TIMEOUT GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 90)
40#define SEARCHES_IN_PARALLEL 2 40#define SEARCHES_IN_PARALLEL 2
41#define ANNOUNCE_DELAY GNUNET_TIME_relative_multiply(\
42 GNUNET_TIME_UNIT_MILLISECONDS,\
43 300)
44#define SEARCH_DELAY GNUNET_TIME_relative_multiply(\
45 GNUNET_TIME_UNIT_MILLISECONDS,\
46 200)
41 47
42/** 48/**
43 * DLL of operations 49 * DLL of operations
@@ -822,7 +828,7 @@ regex_found_handler (void *cls,
822 { 828 {
823 GNUNET_SCHEDULER_cancel (peer->timeout); 829 GNUNET_SCHEDULER_cancel (peer->timeout);
824 peer->timeout = GNUNET_SCHEDULER_NO_TASK; 830 peer->timeout = GNUNET_SCHEDULER_NO_TASK;
825 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &find_next_string, NULL); 831 GNUNET_SCHEDULER_add_delayed (SEARCH_DELAY, &find_next_string, NULL);
826 } 832 }
827 833
828 if (NULL == id) 834 if (NULL == id)
@@ -1097,9 +1103,7 @@ arm_start_cb (void *cls, struct GNUNET_ARM_Handle *arm,
1097 if (arm_peer_cnt < (num_peers - 1)) 1103 if (arm_peer_cnt < (num_peers - 1))
1098 { 1104 {
1099 next_p = (++arm_peer_cnt % num_peers); 1105 next_p = (++arm_peer_cnt % num_peers);
1100 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply( 1106 GNUNET_SCHEDULER_add_delayed (ANNOUNCE_DELAY,
1101 GNUNET_TIME_UNIT_MILLISECONDS,
1102 1000),
1103 &announce_next_regex, 1107 &announce_next_regex,
1104 (void *) (long) next_p); 1108 (void *) (long) next_p);
1105 } 1109 }