diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-08-11 21:21:56 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-08-11 21:21:56 +0000 |
commit | 3d7fefedc9ba60bd8e8448efe8b628446d958536 (patch) | |
tree | 61ce41a52cd6e7232cead77818ef265993b2427e /src/dht | |
parent | 4a0398474db197abed243a123fb971fbeeffab4b (diff) | |
download | gnunet-3d7fefedc9ba60bd8e8448efe8b628446d958536.tar.gz gnunet-3d7fefedc9ba60bd8e8448efe8b628446d958536.zip |
changing time measurement from milliseconds to microseconds
Diffstat (limited to 'src/dht')
-rw-r--r-- | src/dht/gnunet-service-dht_clients.c | 6 | ||||
-rw-r--r-- | src/dht/gnunet-service-dht_hello.c | 2 | ||||
-rw-r--r-- | src/dht/gnunet-service-dht_neighbours.c | 10 | ||||
-rw-r--r-- | src/dht/gnunet-service-dht_routing.c | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/src/dht/gnunet-service-dht_clients.c b/src/dht/gnunet-service-dht_clients.c index e15893bed..70b1500cc 100644 --- a/src/dht/gnunet-service-dht_clients.c +++ b/src/dht/gnunet-service-dht_clients.c | |||
@@ -461,11 +461,11 @@ transmit_next_request_task (void *cls, | |||
461 | { | 461 | { |
462 | cqr->hnode = NULL; | 462 | cqr->hnode = NULL; |
463 | delay = GNUNET_TIME_absolute_get_remaining (cqr->retry_time); | 463 | delay = GNUNET_TIME_absolute_get_remaining (cqr->retry_time); |
464 | if (delay.rel_value > 0) | 464 | if (delay.rel_value_us > 0) |
465 | { | 465 | { |
466 | cqr->hnode = | 466 | cqr->hnode = |
467 | GNUNET_CONTAINER_heap_insert (retry_heap, cqr, | 467 | GNUNET_CONTAINER_heap_insert (retry_heap, cqr, |
468 | cqr->retry_time.abs_value); | 468 | cqr->retry_time.abs_value_us); |
469 | retry_task = | 469 | retry_task = |
470 | GNUNET_SCHEDULER_add_delayed (delay, &transmit_next_request_task, | 470 | GNUNET_SCHEDULER_add_delayed (delay, &transmit_next_request_task, |
471 | NULL); | 471 | NULL); |
@@ -474,7 +474,7 @@ transmit_next_request_task (void *cls, | |||
474 | transmit_request (cqr); | 474 | transmit_request (cqr); |
475 | cqr->hnode = | 475 | cqr->hnode = |
476 | GNUNET_CONTAINER_heap_insert (retry_heap, cqr, | 476 | GNUNET_CONTAINER_heap_insert (retry_heap, cqr, |
477 | cqr->retry_time.abs_value); | 477 | cqr->retry_time.abs_value_us); |
478 | } | 478 | } |
479 | } | 479 | } |
480 | 480 | ||
diff --git a/src/dht/gnunet-service-dht_hello.c b/src/dht/gnunet-service-dht_hello.c index 32a99203f..2ce7f1925 100644 --- a/src/dht/gnunet-service-dht_hello.c +++ b/src/dht/gnunet-service-dht_hello.c | |||
@@ -76,7 +76,7 @@ process_hello (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
76 | if (hello == NULL) | 76 | if (hello == NULL) |
77 | return; | 77 | return; |
78 | ex = GNUNET_HELLO_get_last_expiration (hello); | 78 | ex = GNUNET_HELLO_get_last_expiration (hello); |
79 | if (GNUNET_TIME_absolute_get_remaining (ex).rel_value == 0) | 79 | if (0 == GNUNET_TIME_absolute_get_remaining (ex).rel_value_us) |
80 | return; | 80 | return; |
81 | GNUNET_STATISTICS_update (GDS_stats, | 81 | GNUNET_STATISTICS_update (GDS_stats, |
82 | gettext_noop ("# HELLOs obtained from peerinfo"), 1, | 82 | gettext_noop ("# HELLOs obtained from peerinfo"), 1, |
diff --git a/src/dht/gnunet-service-dht_neighbours.c b/src/dht/gnunet-service-dht_neighbours.c index 16955629c..3041cccfe 100644 --- a/src/dht/gnunet-service-dht_neighbours.c +++ b/src/dht/gnunet-service-dht_neighbours.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet. | 2 | This file is part of GNUnet. |
3 | (C) 2009, 2010, 2011 Christian Grothoff (and other contributing authors) | 3 | (C) 2009-2013 Christian Grothoff (and other contributing authors) |
4 | 4 | ||
5 | GNUnet is free software; you can redistribute it and/or modify | 5 | GNUnet is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published | 6 | it under the terms of the GNU General Public License as published |
@@ -602,10 +602,10 @@ send_find_peer_message (void *cls, | |||
602 | GNUNET_CONTAINER_bloomfilter_free (peer_bf); | 602 | GNUNET_CONTAINER_bloomfilter_free (peer_bf); |
603 | GNUNET_CONTAINER_bloomfilter_free (bcc.bloom); | 603 | GNUNET_CONTAINER_bloomfilter_free (bcc.bloom); |
604 | /* schedule next round */ | 604 | /* schedule next round */ |
605 | next_send_time.rel_value = | 605 | next_send_time.rel_value_us = |
606 | DHT_MINIMUM_FIND_PEER_INTERVAL.rel_value + | 606 | DHT_MINIMUM_FIND_PEER_INTERVAL.rel_value_us + |
607 | GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK, | 607 | GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK, |
608 | DHT_MAXIMUM_FIND_PEER_INTERVAL.rel_value / | 608 | DHT_MAXIMUM_FIND_PEER_INTERVAL.rel_value_us / |
609 | (newly_found_peers + 1)); | 609 | (newly_found_peers + 1)); |
610 | newly_found_peers = 0; | 610 | newly_found_peers = 0; |
611 | find_peer_task = | 611 | find_peer_task = |
@@ -757,7 +757,7 @@ core_transmit_notify (void *cls, size_t size, void *buf) | |||
757 | 757 | ||
758 | peer->th = NULL; | 758 | peer->th = NULL; |
759 | while ((NULL != (pending = peer->head)) && | 759 | while ((NULL != (pending = peer->head)) && |
760 | (GNUNET_TIME_absolute_get_remaining (pending->timeout).rel_value == 0)) | 760 | (0 == GNUNET_TIME_absolute_get_remaining (pending->timeout).rel_value_us)) |
761 | { | 761 | { |
762 | peer->pending_count--; | 762 | peer->pending_count--; |
763 | GNUNET_CONTAINER_DLL_remove (peer->head, peer->tail, pending); | 763 | GNUNET_CONTAINER_DLL_remove (peer->head, peer->tail, pending); |
diff --git a/src/dht/gnunet-service-dht_routing.c b/src/dht/gnunet-service-dht_routing.c index efcdf0e14..8889de4fb 100644 --- a/src/dht/gnunet-service-dht_routing.c +++ b/src/dht/gnunet-service-dht_routing.c | |||
@@ -421,7 +421,7 @@ GDS_ROUTING_add (const struct GNUNET_PeerIdentity *sender, | |||
421 | } | 421 | } |
422 | recent_req->heap_node = | 422 | recent_req->heap_node = |
423 | GNUNET_CONTAINER_heap_insert (recent_heap, recent_req, | 423 | GNUNET_CONTAINER_heap_insert (recent_heap, recent_req, |
424 | GNUNET_TIME_absolute_get ().abs_value); | 424 | GNUNET_TIME_absolute_get ().abs_value_us); |
425 | GNUNET_CONTAINER_multihashmap_put (recent_map, key, recent_req, | 425 | GNUNET_CONTAINER_multihashmap_put (recent_map, key, recent_req, |
426 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE); | 426 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE); |
427 | 427 | ||