changing time measurement from milliseconds to microseconds
[oweals/gnunet.git] / src / namestore / test_namestore_api_zone_iteration.c
index 63e4adf40121f9944bc4eaf97990eac637e0310b..036944e9a2fae6e8362af0386a72d9c71f2691ed 100644 (file)
@@ -195,7 +195,9 @@ zone_proc (void *cls,
     else
       res = 1;
 
-    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received last result, iteration done after receing %u results\n",returned_records );
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 
+               "Received last result, iteration done after receing %u results\n",
+               returned_records );
     GNUNET_SCHEDULER_add_now (&end, NULL);
   }
   else
@@ -205,7 +207,10 @@ zone_proc (void *cls,
     {
       struct GNUNET_HashCode zone_key_hash;
       GNUNET_CRYPTO_hash (zone_key, sizeof (struct GNUNET_CRYPTO_EccPublicKey), &zone_key_hash);
-      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);
+      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 
+                 "Verifying signature for `%s' in zone `%s' with %u records and expiration %s failed\n", 
+                 name, GNUNET_h2s(&zone_key_hash), rd_count, 
+                 GNUNET_STRINGS_absolute_time_to_string (expire));
 
       failed = GNUNET_YES;
       GNUNET_break (0);
@@ -337,7 +342,7 @@ create_record (unsigned int count)
   rd = GNUNET_malloc (count * sizeof (struct GNUNET_NAMESTORE_RecordData));
   for (c = 0; c < count; c++)
   {
-    rd[c].expiration_time = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS).abs_value;
+    rd[c].expiration_time = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS).abs_value_us;
     rd[c].record_type = 1111;
     rd[c].data_size = 50;
     rd[c].data = GNUNET_malloc(50);
@@ -392,7 +397,7 @@ empty_zone_proc (void *cls,
 
   GNUNET_asprintf(&s_name_1, "dummy1");
   s_rd_1 = create_record(1);
-  et.abs_value = s_rd_1->expiration_time;
+  et.abs_value_us = s_rd_1->expiration_time;
   sig_1 = GNUNET_NAMESTORE_create_signature(privkey, et, s_name_1, s_rd_1, 1);
   GNUNET_NAMESTORE_record_put_by_authority (nsh, privkey, s_name_1, 
                                            1, s_rd_1, 
@@ -403,7 +408,7 @@ empty_zone_proc (void *cls,
   GNUNET_asprintf(&s_name_2, "dummy2");
   s_rd_2 = create_record(1);
 
-  et.abs_value = s_rd_2->expiration_time;
+  et.abs_value_us = s_rd_2->expiration_time;
   sig_2 = GNUNET_NAMESTORE_create_signature(privkey, et, s_name_2, s_rd_2, 1);
   GNUNET_NAMESTORE_record_put_by_authority (nsh, privkey, s_name_2,
                                            1, s_rd_2, 
@@ -413,7 +418,7 @@ empty_zone_proc (void *cls,
   /* name in different zone */
   GNUNET_asprintf(&s_name_3, "dummy3");
   s_rd_3 = create_record(1);
-  et.abs_value = s_rd_3->expiration_time;
+  et.abs_value_us = s_rd_3->expiration_time;
   sig_3 = GNUNET_NAMESTORE_create_signature(privkey2, et, s_name_3, s_rd_3, 1);
   GNUNET_NAMESTORE_record_put (nsh, &pubkey2, s_name_3, GNUNET_TIME_UNIT_FOREVER_ABS, 1, s_rd_3, sig_3, &put_cont, NULL);
 }