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/namestore/test_namestore_api_zone_iteration.c | |
parent | 4a0398474db197abed243a123fb971fbeeffab4b (diff) | |
download | gnunet-3d7fefedc9ba60bd8e8448efe8b628446d958536.tar.gz gnunet-3d7fefedc9ba60bd8e8448efe8b628446d958536.zip |
changing time measurement from milliseconds to microseconds
Diffstat (limited to 'src/namestore/test_namestore_api_zone_iteration.c')
-rw-r--r-- | src/namestore/test_namestore_api_zone_iteration.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/namestore/test_namestore_api_zone_iteration.c b/src/namestore/test_namestore_api_zone_iteration.c index 63e4adf40..036944e9a 100644 --- a/src/namestore/test_namestore_api_zone_iteration.c +++ b/src/namestore/test_namestore_api_zone_iteration.c | |||
@@ -195,7 +195,9 @@ zone_proc (void *cls, | |||
195 | else | 195 | else |
196 | res = 1; | 196 | res = 1; |
197 | 197 | ||
198 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received last result, iteration done after receing %u results\n",returned_records ); | 198 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
199 | "Received last result, iteration done after receing %u results\n", | ||
200 | returned_records ); | ||
199 | GNUNET_SCHEDULER_add_now (&end, NULL); | 201 | GNUNET_SCHEDULER_add_now (&end, NULL); |
200 | } | 202 | } |
201 | else | 203 | else |
@@ -205,7 +207,10 @@ zone_proc (void *cls, | |||
205 | { | 207 | { |
206 | struct GNUNET_HashCode zone_key_hash; | 208 | struct GNUNET_HashCode zone_key_hash; |
207 | GNUNET_CRYPTO_hash (zone_key, sizeof (struct GNUNET_CRYPTO_EccPublicKey), &zone_key_hash); | 209 | GNUNET_CRYPTO_hash (zone_key, sizeof (struct GNUNET_CRYPTO_EccPublicKey), &zone_key_hash); |
208 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Verifying signature for `%s' in zone `%s' with %u records and expiration %llu failed\n", name, GNUNET_h2s(&zone_key_hash), rd_count, expire.abs_value); | 210 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
211 | "Verifying signature for `%s' in zone `%s' with %u records and expiration %s failed\n", | ||
212 | name, GNUNET_h2s(&zone_key_hash), rd_count, | ||
213 | GNUNET_STRINGS_absolute_time_to_string (expire)); | ||
209 | 214 | ||
210 | failed = GNUNET_YES; | 215 | failed = GNUNET_YES; |
211 | GNUNET_break (0); | 216 | GNUNET_break (0); |
@@ -337,7 +342,7 @@ create_record (unsigned int count) | |||
337 | rd = GNUNET_malloc (count * sizeof (struct GNUNET_NAMESTORE_RecordData)); | 342 | rd = GNUNET_malloc (count * sizeof (struct GNUNET_NAMESTORE_RecordData)); |
338 | for (c = 0; c < count; c++) | 343 | for (c = 0; c < count; c++) |
339 | { | 344 | { |
340 | rd[c].expiration_time = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS).abs_value; | 345 | rd[c].expiration_time = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS).abs_value_us; |
341 | rd[c].record_type = 1111; | 346 | rd[c].record_type = 1111; |
342 | rd[c].data_size = 50; | 347 | rd[c].data_size = 50; |
343 | rd[c].data = GNUNET_malloc(50); | 348 | rd[c].data = GNUNET_malloc(50); |
@@ -392,7 +397,7 @@ empty_zone_proc (void *cls, | |||
392 | 397 | ||
393 | GNUNET_asprintf(&s_name_1, "dummy1"); | 398 | GNUNET_asprintf(&s_name_1, "dummy1"); |
394 | s_rd_1 = create_record(1); | 399 | s_rd_1 = create_record(1); |
395 | et.abs_value = s_rd_1->expiration_time; | 400 | et.abs_value_us = s_rd_1->expiration_time; |
396 | sig_1 = GNUNET_NAMESTORE_create_signature(privkey, et, s_name_1, s_rd_1, 1); | 401 | sig_1 = GNUNET_NAMESTORE_create_signature(privkey, et, s_name_1, s_rd_1, 1); |
397 | GNUNET_NAMESTORE_record_put_by_authority (nsh, privkey, s_name_1, | 402 | GNUNET_NAMESTORE_record_put_by_authority (nsh, privkey, s_name_1, |
398 | 1, s_rd_1, | 403 | 1, s_rd_1, |
@@ -403,7 +408,7 @@ empty_zone_proc (void *cls, | |||
403 | GNUNET_asprintf(&s_name_2, "dummy2"); | 408 | GNUNET_asprintf(&s_name_2, "dummy2"); |
404 | s_rd_2 = create_record(1); | 409 | s_rd_2 = create_record(1); |
405 | 410 | ||
406 | et.abs_value = s_rd_2->expiration_time; | 411 | et.abs_value_us = s_rd_2->expiration_time; |
407 | sig_2 = GNUNET_NAMESTORE_create_signature(privkey, et, s_name_2, s_rd_2, 1); | 412 | sig_2 = GNUNET_NAMESTORE_create_signature(privkey, et, s_name_2, s_rd_2, 1); |
408 | GNUNET_NAMESTORE_record_put_by_authority (nsh, privkey, s_name_2, | 413 | GNUNET_NAMESTORE_record_put_by_authority (nsh, privkey, s_name_2, |
409 | 1, s_rd_2, | 414 | 1, s_rd_2, |
@@ -413,7 +418,7 @@ empty_zone_proc (void *cls, | |||
413 | /* name in different zone */ | 418 | /* name in different zone */ |
414 | GNUNET_asprintf(&s_name_3, "dummy3"); | 419 | GNUNET_asprintf(&s_name_3, "dummy3"); |
415 | s_rd_3 = create_record(1); | 420 | s_rd_3 = create_record(1); |
416 | et.abs_value = s_rd_3->expiration_time; | 421 | et.abs_value_us = s_rd_3->expiration_time; |
417 | sig_3 = GNUNET_NAMESTORE_create_signature(privkey2, et, s_name_3, s_rd_3, 1); | 422 | sig_3 = GNUNET_NAMESTORE_create_signature(privkey2, et, s_name_3, s_rd_3, 1); |
418 | GNUNET_NAMESTORE_record_put (nsh, &pubkey2, s_name_3, GNUNET_TIME_UNIT_FOREVER_ABS, 1, s_rd_3, sig_3, &put_cont, NULL); | 423 | GNUNET_NAMESTORE_record_put (nsh, &pubkey2, s_name_3, GNUNET_TIME_UNIT_FOREVER_ABS, 1, s_rd_3, sig_3, &put_cont, NULL); |
419 | } | 424 | } |