gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r28501 - in gnunet/src: arm ats core datacache datastore dh


From: gnunet
Subject: [GNUnet-SVN] r28501 - in gnunet/src: arm ats core datacache datastore dht dns exit experimentation fragmentation fs gns hello hostlist identity include mesh namestore nse peerinfo pt regex sysmon testbed topology transport util vpn
Date: Sun, 11 Aug 2013 23:21:57 +0200

Author: grothoff
Date: 2013-08-11 23:21:56 +0200 (Sun, 11 Aug 2013)
New Revision: 28501

Modified:
   gnunet/src/arm/gnunet-arm.c
   gnunet/src/arm/gnunet-service-arm.c
   gnunet/src/arm/test_exponential_backoff.c
   gnunet/src/ats/gnunet-service-ats-solver_mlp.c
   gnunet/src/ats/gnunet-service-ats-solver_proportional.c
   gnunet/src/ats/gnunet-service-ats_performance.c
   gnunet/src/ats/gnunet-service-ats_reservations.c
   gnunet/src/ats/perf_ats_mlp.c
   gnunet/src/ats/test_ats_api_scheduling_block_and_reset.c
   gnunet/src/ats/test_ats_api_scheduling_init.c
   gnunet/src/core/gnunet-service-core_kx.c
   gnunet/src/core/gnunet-service-core_sessions.c
   gnunet/src/core/test_core_api_reliability.c
   gnunet/src/core/test_core_quota_compliance.c
   gnunet/src/datacache/perf_datacache.c
   gnunet/src/datacache/plugin_datacache_heap.c
   gnunet/src/datacache/plugin_datacache_postgres.c
   gnunet/src/datacache/plugin_datacache_sqlite.c
   gnunet/src/datacache/test_datacache.c
   gnunet/src/datacache/test_datacache_quota.c
   gnunet/src/datastore/datastore_api.c
   gnunet/src/datastore/gnunet-service-datastore.c
   gnunet/src/datastore/perf_datastore_api.c
   gnunet/src/datastore/perf_plugin_datastore.c
   gnunet/src/datastore/plugin_datastore_heap.c
   gnunet/src/datastore/plugin_datastore_mysql.c
   gnunet/src/datastore/plugin_datastore_postgres.c
   gnunet/src/datastore/plugin_datastore_sqlite.c
   gnunet/src/datastore/test_datastore_api.c
   gnunet/src/datastore/test_datastore_api_management.c
   gnunet/src/datastore/test_plugin_datastore.c
   gnunet/src/dht/gnunet-service-dht_clients.c
   gnunet/src/dht/gnunet-service-dht_hello.c
   gnunet/src/dht/gnunet-service-dht_neighbours.c
   gnunet/src/dht/gnunet-service-dht_routing.c
   gnunet/src/dns/dnsparser.c
   gnunet/src/dns/dnsstub.c
   gnunet/src/dns/gnunet-dns-monitor.c
   gnunet/src/dns/plugin_block_dns.c
   gnunet/src/exit/gnunet-daemon-exit.c
   gnunet/src/experimentation/gnunet-daemon-experimentation_experiments.c
   gnunet/src/experimentation/gnunet-daemon-experimentation_scheduler.c
   gnunet/src/fragmentation/defragmentation.c
   gnunet/src/fragmentation/fragmentation.c
   gnunet/src/fs/fs_api.c
   gnunet/src/fs/fs_download.c
   gnunet/src/fs/fs_misc.c
   gnunet/src/fs/fs_search.c
   gnunet/src/fs/fs_uri.c
   gnunet/src/fs/gnunet-daemon-fsprofiler.c
   gnunet/src/fs/gnunet-download.c
   gnunet/src/fs/gnunet-fs-profiler.c
   gnunet/src/fs/gnunet-search.c
   gnunet/src/fs/gnunet-service-fs.c
   gnunet/src/fs/gnunet-service-fs_cp.c
   gnunet/src/fs/gnunet-service-fs_pe.c
   gnunet/src/fs/gnunet-service-fs_pr.c
   gnunet/src/fs/gnunet-service-fs_push.c
   gnunet/src/fs/perf_gnunet_service_fs_p2p.c
   gnunet/src/fs/perf_gnunet_service_fs_p2p_respect.c
   gnunet/src/fs/test_fs_download.c
   gnunet/src/fs/test_fs_download_persistence.c
   gnunet/src/fs/test_fs_list_indexed.c
   gnunet/src/fs/test_fs_publish.c
   gnunet/src/fs/test_fs_publish_persistence.c
   gnunet/src/fs/test_fs_unindex.c
   gnunet/src/fs/test_fs_unindex_persistence.c
   gnunet/src/fs/test_gnunet_service_fs_migration.c
   gnunet/src/fs/test_gnunet_service_fs_p2p.c
   gnunet/src/gns/gnunet-dns2gns.c
   gnunet/src/gns/gnunet-gns-fcfsd.c
   gnunet/src/gns/gnunet-gns-proxy.c
   gnunet/src/gns/gnunet-service-gns.c
   gnunet/src/gns/gnunet-service-gns_interceptor.c
   gnunet/src/gns/gnunet-service-gns_resolver.c
   gnunet/src/gns/plugin_block_gns.c
   gnunet/src/gns/test_gns_dht_three_peers.c
   gnunet/src/gns/test_gns_proxy.c
   gnunet/src/gns/test_gns_pseu_shorten.c
   gnunet/src/gns/test_gns_simple_delegated_lookup.c
   gnunet/src/gns/test_gns_simple_mx_lookup.c
   gnunet/src/gns/test_gns_simple_srv_lookup.c
   gnunet/src/hello/hello.c
   gnunet/src/hostlist/hostlist-client.c
   gnunet/src/hostlist/hostlist-server.c
   gnunet/src/identity/identity_api.c
   gnunet/src/include/gnunet_ats_service.h
   gnunet/src/include/gnunet_client_lib.h
   gnunet/src/include/gnunet_resolver_service.h
   gnunet/src/include/gnunet_scheduler_lib.h
   gnunet/src/include/gnunet_server_lib.h
   gnunet/src/include/gnunet_time_lib.h
   gnunet/src/mesh/gnunet-service-mesh-enc.c
   gnunet/src/mesh/gnunet-service-mesh.c
   gnunet/src/mesh/mesh_api.c
   gnunet/src/mesh/mesh_api_enc.c
   gnunet/src/mesh/test_mesh_small.c
   gnunet/src/namestore/gnunet-namestore.c
   gnunet/src/namestore/gnunet-service-namestore.c
   gnunet/src/namestore/namestore_api_common.c
   gnunet/src/namestore/plugin_namestore_postgres.c
   gnunet/src/namestore/plugin_namestore_sqlite.c
   gnunet/src/namestore/test_namestore_api.c
   gnunet/src/namestore/test_namestore_api_create.c
   gnunet/src/namestore/test_namestore_api_create_update.c
   gnunet/src/namestore/test_namestore_api_lookup.c
   gnunet/src/namestore/test_namestore_api_lookup_specific_type.c
   gnunet/src/namestore/test_namestore_api_monitoring.c
   gnunet/src/namestore/test_namestore_api_put.c
   gnunet/src/namestore/test_namestore_api_remove.c
   gnunet/src/namestore/test_namestore_api_remove_not_existing_record.c
   gnunet/src/namestore/test_namestore_api_sign_verify.c
   gnunet/src/namestore/test_namestore_api_zone_iteration.c
   gnunet/src/namestore/test_namestore_api_zone_iteration_specific_zone.c
   gnunet/src/namestore/test_namestore_api_zone_iteration_stop.c
   gnunet/src/namestore/test_namestore_api_zone_to_name.c
   gnunet/src/namestore/test_plugin_namestore.c
   gnunet/src/nse/gnunet-nse-profiler.c
   gnunet/src/nse/gnunet-service-nse.c
   gnunet/src/nse/nse_api.c
   gnunet/src/nse/perf_kdf.c
   gnunet/src/peerinfo/gnunet-service-peerinfo.c
   gnunet/src/pt/test_gns_vpn.c
   gnunet/src/regex/gnunet-daemon-regexprofiler.c
   gnunet/src/regex/plugin_block_regex.c
   gnunet/src/sysmon/gnunet-service-sysmon.c
   gnunet/src/testbed/gnunet-service-testbed_cpustatus.c
   gnunet/src/testbed/testbed_api_hosts.c
   gnunet/src/topology/gnunet-daemon-topology.c
   gnunet/src/transport/gnunet-service-transport.c
   gnunet/src/transport/gnunet-service-transport_manipulation.c
   gnunet/src/transport/gnunet-service-transport_neighbours.c
   gnunet/src/transport/gnunet-service-transport_validation.c
   gnunet/src/transport/gnunet-transport.c
   gnunet/src/transport/plugin_transport_bluetooth.c
   gnunet/src/transport/plugin_transport_http.c
   gnunet/src/transport/plugin_transport_http_client.c
   gnunet/src/transport/plugin_transport_http_server.c
   gnunet/src/transport/plugin_transport_tcp.c
   gnunet/src/transport/plugin_transport_udp.c
   gnunet/src/transport/plugin_transport_unix.c
   gnunet/src/transport/plugin_transport_wlan.c
   gnunet/src/transport/test_quota_compliance.c
   gnunet/src/transport/test_transport_api_manipulation_cfg.c
   gnunet/src/transport/test_transport_api_manipulation_recv_tcp.c
   gnunet/src/transport/test_transport_api_manipulation_send_tcp.c
   gnunet/src/transport/test_transport_api_reliability.c
   gnunet/src/transport/test_transport_api_timeout.c
   gnunet/src/transport/test_transport_api_unreliability.c
   gnunet/src/transport/test_transport_api_unreliability_constant.c
   gnunet/src/transport/transport_api.c
   gnunet/src/util/bandwidth.c
   gnunet/src/util/client.c
   gnunet/src/util/common_logging.c
   gnunet/src/util/connection.c
   gnunet/src/util/gnunet-service-resolver.c
   gnunet/src/util/load.c
   gnunet/src/util/network.c
   gnunet/src/util/perf_crypto_hash.c
   gnunet/src/util/perf_malloc.c
   gnunet/src/util/resolver_api.c
   gnunet/src/util/scheduler.c
   gnunet/src/util/server.c
   gnunet/src/util/speedup.c
   gnunet/src/util/strings.c
   gnunet/src/util/test_common_logging_dummy.c
   gnunet/src/util/test_crypto_ecc.c
   gnunet/src/util/test_scheduler_delay.c
   gnunet/src/util/test_speedup.c
   gnunet/src/util/test_strings.c
   gnunet/src/util/test_time.c
   gnunet/src/util/time.c
   gnunet/src/vpn/gnunet-service-vpn.c
Log:
changing time measurement from milliseconds to microseconds

Modified: gnunet/src/arm/gnunet-arm.c
===================================================================
--- gnunet/src/arm/gnunet-arm.c 2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/arm/gnunet-arm.c 2013-08-11 21:21:56 UTC (rev 28501)
@@ -547,7 +547,7 @@
       {
         GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Termination action\n");
         GNUNET_ARM_request_service_stop (h, term, 
-                                        (0 == timeout.rel_value) ? 
STOP_TIMEOUT : timeout,
+                                        (0 == timeout.rel_value_us) ? 
STOP_TIMEOUT : timeout,
                                         &term_callback, NULL);
        return;
       }
@@ -557,7 +557,7 @@
       {
         GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "End action\n");
         GNUNET_ARM_request_service_stop (h, "arm", 
-                                        (0 == timeout.rel_value) ? 
STOP_TIMEOUT_ARM : timeout,
+                                        (0 == timeout.rel_value_us) ? 
STOP_TIMEOUT_ARM : timeout,
                                         &stop_callback, NULL);
         return;
       }
@@ -569,7 +569,7 @@
         GNUNET_ARM_request_service_start (h, "arm",
             (no_stdout ? 0 : GNUNET_OS_INHERIT_STD_OUT) |
             (no_stderr ? 0 : GNUNET_OS_INHERIT_STD_ERR),
-            (0 == timeout.rel_value) ? START_TIMEOUT: timeout,
+            (0 == timeout.rel_value_us) ? START_TIMEOUT: timeout,
             start_callback, NULL);
         return;
       }
@@ -579,7 +579,7 @@
       {
         GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Initialization action\n");
         GNUNET_ARM_request_service_start (h, init, GNUNET_OS_INHERIT_STD_NONE,
-                                         (0 == timeout.rel_value) ? 
STOP_TIMEOUT : timeout,
+                                         (0 == timeout.rel_value_us) ? 
STOP_TIMEOUT : timeout,
                                          &init_callback, NULL);
         return;
       }
@@ -590,7 +590,7 @@
        GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                    "Going to list all running services controlled by ARM.\n"); 
         GNUNET_ARM_request_service_list (h,
-                                        (0 == timeout.rel_value) ? 
LIST_TIMEOUT : timeout,
+                                        (0 == timeout.rel_value_us) ? 
LIST_TIMEOUT : timeout,
                                         &list_callback, &list);
        return;
       }    

Modified: gnunet/src/arm/gnunet-service-arm.c
===================================================================
--- gnunet/src/arm/gnunet-service-arm.c 2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/arm/gnunet-service-arm.c 2013-08-11 21:21:56 UTC (rev 28501)
@@ -1012,8 +1012,7 @@
     if (NULL != sl->proc)
       continue;
     /* service is currently not running */
-    if (GNUNET_TIME_absolute_get_remaining (sl->restart_at).rel_value ==
-       0)
+    if (0 == GNUNET_TIME_absolute_get_remaining (sl->restart_at).rel_value_us)
     {
       /* restart is now allowed */
       if (sl->is_default)
@@ -1046,7 +1045,7 @@
                                  (sl->restart_at));
     }
   }
-  if (lowestRestartDelay.rel_value != GNUNET_TIME_UNIT_FOREVER_REL.rel_value)
+  if (lowestRestartDelay.rel_value_us != 
GNUNET_TIME_UNIT_FOREVER_REL.rel_value_us)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 
                "Will restart process in %s\n",
@@ -1126,7 +1125,7 @@
        statstr = _( /* process termination method */ "unknown");
        statcode = 0;
       }
-      if (0 != pos->killed_at.abs_value)
+      if (0 != pos->killed_at.abs_value_us)
       {
        GNUNET_log (GNUNET_ERROR_TYPE_INFO,
                    _("Service `%s' took %s to terminate\n"),
@@ -1149,7 +1148,7 @@
         if ((statusType == GNUNET_OS_PROCESS_EXITED) && (statcode == 0))
         {
           /* process terminated normally, allow restart at any time */
-          pos->restart_at.abs_value = 0;
+          pos->restart_at.abs_value_us = 0;
           GNUNET_log (GNUNET_ERROR_TYPE_INFO,
               _("Service `%s' terminated normally, will restart at any 
time\n"),
               pos->name);

Modified: gnunet/src/arm/test_exponential_backoff.c
===================================================================
--- gnunet/src/arm/test_exponential_backoff.c   2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/arm/test_exponential_backoff.c   2013-08-11 21:21:56 UTC (rev 
28501)
@@ -250,7 +250,7 @@
   }
   else
   {
-    waitedFor.rel_value = 0;
+    waitedFor.rel_value_us = 0;
   }
   /* Connect to the doNothing task */
   doNothingConnection = GNUNET_CLIENT_connect ("do-nothing", cfg);
@@ -261,7 +261,7 @@
   {
     GNUNET_CLIENT_disconnect (doNothingConnection);
     GNUNET_ARM_request_service_stop (arm, "do-nothing", TIMEOUT, NULL, NULL);
-    if (waitedFor_prev.rel_value >= waitedFor.rel_value)
+    if (waitedFor_prev.rel_value_us >= waitedFor.rel_value_us)
       ok = 9;
     else
       ok = 0;

Modified: gnunet/src/ats/gnunet-service-ats-solver_mlp.c
===================================================================
--- gnunet/src/ats/gnunet-service-ats-solver_mlp.c      2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/ats/gnunet-service-ats-solver_mlp.c      2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -1078,7 +1078,7 @@
        else
        {
                        LOG (GNUNET_ERROR_TYPE_DEBUG, "Problem was updated, 
resolving\n");
-                       duration_build.rel_value = 0;
+                       duration_build.rel_value_us = 0;
        }
 
        /* Run LP solver */
@@ -1107,10 +1107,15 @@
        mlp->ps.p_rows = glp_get_num_rows (mlp->p.prob);
        mlp->ps.p_elements = mlp->p.num_elements;
 
-       LOG (GNUNET_ERROR_TYPE_DEBUG, "Execution time: Build %llu ms, LP %llu 
ms,  MLP %llu ms\n",
-                       (unsigned long long) duration_build.rel_value,
-                       (unsigned long long) duration_lp.rel_value,
-                       (unsigned long long) duration_mlp.rel_value);
+       LOG (GNUNET_ERROR_TYPE_DEBUG, 
+            "Execution time: Build %s\n",
+            GNUNET_STRINGS_relative_time_to_string (duration_build, 
GNUNET_NO));
+       LOG (GNUNET_ERROR_TYPE_DEBUG, 
+            "Execution time: LP %s\n",
+            GNUNET_STRINGS_relative_time_to_string (duration_lp, GNUNET_NO));
+       LOG (GNUNET_ERROR_TYPE_DEBUG, 
+            "Execution time: MLP %s\n",
+            GNUNET_STRINGS_relative_time_to_string (duration_mlp, GNUNET_NO));
 
        /* Propagate result*/
        if ((GNUNET_OK == res_lp) && (GNUNET_OK == res_mip))
@@ -1120,7 +1125,7 @@
        if (GNUNET_YES == mlp->write_mip_mps)
        {
                /* Write problem to disk */
-               GNUNET_asprintf (&filename, "problem_p_%u_a%u_%llu.mps", 
mlp->p.num_peers, mlp->p.num_addresses, time.abs_value);
+               GNUNET_asprintf (&filename, "problem_p_%u_a%u_%llu.mps", 
mlp->p.num_peers, mlp->p.num_addresses, time.abs_value_us);
                LOG (GNUNET_ERROR_TYPE_ERROR, "DUMP: %s \n", filename);
                glp_write_lp(mlp->p.prob, NULL, filename);
                GNUNET_free (filename);
@@ -1128,7 +1133,7 @@
        if (GNUNET_YES == mlp->write_mip_sol)
        {
                /* Write solution to disk */
-               GNUNET_asprintf (&filename, "problem_p_%u_a%u_%llu.sol", 
mlp->p.num_peers, mlp->p.num_addresses, time.abs_value);
+               GNUNET_asprintf (&filename, "problem_p_%u_a%u_%llu.sol", 
mlp->p.num_peers, mlp->p.num_addresses, time.abs_value_us);
                glp_print_mip (mlp->p.prob, filename );
                LOG (GNUNET_ERROR_TYPE_ERROR, "DUMP: %s \n", filename);
                GNUNET_free (filename);
@@ -1965,7 +1970,7 @@
   mlp->control_param_lp.msg_lev = GLP_MSG_ALL;
 #endif
   mlp->control_param_lp.it_lim = max_iterations;
-  mlp->control_param_lp.tm_lim = max_duration.rel_value;
+  mlp->control_param_lp.tm_lim = max_duration.rel_value_us / 1000LL;
 
   /* Init MLP solving parameters */
   glp_init_iocp(&mlp->control_param_mlp);
@@ -1973,7 +1978,7 @@
 #if VERBOSE_GLPK
   mlp->control_param_mlp.msg_lev = GLP_MSG_ALL;
 #endif
-  mlp->control_param_mlp.tm_lim = max_duration.rel_value;
+  mlp->control_param_mlp.tm_lim = max_duration.rel_value_us / 1000LL;
 
   LOG (GNUNET_ERROR_TYPE_DEBUG, "solver ready\n");
 

Modified: gnunet/src/ats/gnunet-service-ats-solver_proportional.c
===================================================================
--- gnunet/src/ats/gnunet-service-ats-solver_proportional.c     2013-08-11 
20:40:36 UTC (rev 28500)
+++ gnunet/src/ats/gnunet-service-ats-solver_proportional.c     2013-08-11 
21:21:56 UTC (rev 28501)
@@ -596,13 +596,14 @@
 
   now = GNUNET_TIME_absolute_get();
 
-  if (current->blocked_until.abs_value == GNUNET_TIME_absolute_max (now, 
current->blocked_until).abs_value)
+  if (current->blocked_until.abs_value_us == GNUNET_TIME_absolute_max (now, 
current->blocked_until).abs_value_us)
   {
     /* This address is blocked for suggestion */
     LOG (GNUNET_ERROR_TYPE_DEBUG,
-                "Address %p blocked for suggestion for %llu ms \n",
-                current,
-                GNUNET_TIME_absolute_get_difference(now, 
current->blocked_until).rel_value);
+        "Address %p blocked for suggestion for %s \n",
+        current,
+        GNUNET_STRINGS_relative_time_to_string 
(GNUNET_TIME_absolute_get_difference (now, current->blocked_until),
+                                                GNUNET_YES));
     return GNUNET_OK;
   }
   if (GNUNET_NO == is_bandwidth_available_in_network (net))

Modified: gnunet/src/ats/gnunet-service-ats_performance.c
===================================================================
--- gnunet/src/ats/gnunet-service-ats_performance.c     2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/ats/gnunet-service-ats_performance.c     2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -582,7 +582,7 @@
               "RESERVATION_REQUEST");
   amount = (int32_t) ntohl (msg->amount);
   res_delay = GAS_reservations_reserve (&msg->peer, amount);
-  if (res_delay.rel_value > 0)
+  if (res_delay.rel_value_us > 0)
     amount = 0;
   result.header.size = htons (sizeof (struct ReservationResultMessage));
   result.header.type = htons (GNUNET_MESSAGE_TYPE_ATS_RESERVATION_RESULT);

Modified: gnunet/src/ats/gnunet-service-ats_reservations.c
===================================================================
--- gnunet/src/ats/gnunet-service-ats_reservations.c    2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/ats/gnunet-service-ats_reservations.c    2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -63,11 +63,13 @@
   if (amount >= 0)
   {
     ret = GNUNET_BANDWIDTH_tracker_get_delay (tracker, amount);
-    if (ret.rel_value > 0)
+    if (ret.rel_value_us > 0)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                  "Delay to satisfy reservation for %d bytes is %llu ms\n",
-                  (int) amount, (unsigned long long) ret.rel_value);
+                  "Delay to satisfy reservation for %d bytes is %s\n",
+                  (int) amount,
+                 GNUNET_STRINGS_relative_time_to_string (ret,
+                                                         GNUNET_YES));
       return ret;
     }
   }

Modified: gnunet/src/ats/perf_ats_mlp.c
===================================================================
--- gnunet/src/ats/perf_ats_mlp.c       2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/ats/perf_ats_mlp.c       2013-08-11 21:21:56 UTC (rev 28501)
@@ -366,39 +366,51 @@
                                }
                                if (GNUNET_NO == opt_numeric)
                                {
-                               fprintf (stderr, "Rebuild: %03u peers each %02u 
addresses; rebuild: LP/MIP state [%3s/%3s] presolv [%3s/%3s], (build/LP/MIP in 
ms) %04llu / %04llu / %04llu\n",
-                                               cp + 1, ca,
-                                               (GNUNET_OK == full_lp_res) ? 
"OK" : "FAIL",
-                                               (GNUNET_OK == full_mip_res) ? 
"OK" : "FAIL",
-                                               (GLP_YES == full_lp_presolv) ? 
"YES" : "NO",
-                                               (GNUNET_OK == full_mip_presolv) 
? "YES" : "NO",
-                                               (unsigned long long) 
full_build_dur.rel_value, (unsigned long long) full_lp_dur.rel_value, (unsigned 
long long) full_mip_dur.rel_value);
+                               fprintf (stderr,
+                                        "Rebuild: %03u peers each %02u 
addresses; rebuild: LP/MIP state [%3s/%3s] presolv [%3s/%3s], (build/LP/MIP in 
us) %04llu / %04llu / %04llu\n",
+                                        cp + 1, ca,
+                                        (GNUNET_OK == full_lp_res) ? "OK" : 
"FAIL",
+                                        (GNUNET_OK == full_mip_res) ? "OK" : 
"FAIL",
+                                        (GLP_YES == full_lp_presolv) ? "YES" : 
"NO",
+                                        (GNUNET_OK == full_mip_presolv) ? 
"YES" : "NO",
+                                        (unsigned long long) 
full_build_dur.rel_value_us,
+                                        (unsigned long long) 
full_lp_dur.rel_value_us, 
+                                        (unsigned long long) 
full_mip_dur.rel_value_us);
                                if ((0 < opt_update_quantity) || (0 < 
opt_update_percent))
-                                       fprintf (stderr, "Update : %03u peers 
each %02u addresses; rebuild: LP/MIP state [%3s/%3s] presolv [%3s/%3s], 
(build/LP/MIP in ms) %04llu / %04llu / %04llu\n",
-                                               cp + 1, ca,
-                                               (GNUNET_OK == update_lp_res) ? 
"OK" : "FAIL",
-                                               (GNUNET_OK == update_mip_res) ? 
"OK" : "FAIL",
-                                               (GLP_YES == update_lp_presolv) 
? "YES" : "NO",
-                                               (GNUNET_OK == 
update_mip_presolv) ? "YES" : "NO",
-                                               (unsigned long long) 
update_build_dur.rel_value, (unsigned long long) update_lp_dur.rel_value, 
(unsigned long long) update_mip_dur.rel_value);
+                                 fprintf (stderr, 
+                                          "Update: %03u peers each %02u 
addresses; rebuild: LP/MIP state [%3s/%3s] presolv [%3s/%3s], (build/LP/MIP in 
us) %04llu / %04llu / %04llu\n",
+                                          cp + 1, ca,
+                                          (GNUNET_OK == update_lp_res) ? "OK" 
: "FAIL",
+                                          (GNUNET_OK == update_mip_res) ? "OK" 
: "FAIL",
+                                          (GLP_YES == update_lp_presolv) ? 
"YES" : "NO",
+                                          (GNUNET_OK == update_mip_presolv) ? 
"YES" : "NO",
+                                          (unsigned long long) 
update_build_dur.rel_value_us,
+                                          (unsigned long long) 
update_lp_dur.rel_value_us, 
+                                          (unsigned long long) 
update_mip_dur.rel_value_us);
                                }
                                else
                                {
-                                               fprintf (stderr, 
"Rebuild;%u;%u;%s;%s;%s;%s;%04llu;%04llu;%04llu\n",
-                                                               cp + 1, ca,
-                                                               (GNUNET_OK == 
full_lp_res) ? "OK" : "FAIL",
-                                                               (GNUNET_OK == 
full_mip_res) ? "OK" : "FAIL",
-                                                               (GLP_YES == 
full_lp_presolv) ? "YES" : "NO",
-                                                               (GNUNET_OK == 
full_mip_presolv) ? "YES" : "NO",
-                                                               (unsigned long 
long) full_build_dur.rel_value, (unsigned long long) full_lp_dur.rel_value, 
(unsigned long long) full_mip_dur.rel_value);
-                                               if ((0 < opt_update_quantity) 
|| (0 < opt_update_percent))
-                                                       fprintf (stderr, 
"Update;%u;%u;%s;%s;%s;%s;%04llu;%04llu;%04llu\n",
-                                                                       cp + 1, 
ca,
-                                                                       
(GNUNET_OK == update_lp_res) ? "OK" : "FAIL",
-                                                                       
(GNUNET_OK == update_mip_res) ? "OK" : "FAIL",
-                                                                       
(GLP_YES == update_lp_presolv) ? "YES" : "NO",
-                                                                       
(GNUNET_OK == update_mip_presolv) ? "YES" : "NO",
-                                                                       
(unsigned long long) update_build_dur.rel_value, (unsigned long long) 
update_lp_dur.rel_value, (unsigned long long) update_mip_dur.rel_value);
+                                 fprintf (stderr, 
+                                          
"Rebuild;%u;%u;%s;%s;%s;%s;%04llu;%04llu;%04llu\n",
+                                          cp + 1, ca,
+                                          (GNUNET_OK == full_lp_res) ? "OK" : 
"FAIL",
+                                          (GNUNET_OK == full_mip_res) ? "OK" : 
"FAIL",
+                                          (GLP_YES == full_lp_presolv) ? "YES" 
: "NO",
+                                          (GNUNET_OK == full_mip_presolv) ? 
"YES" : "NO",
+                                          (unsigned long long) 
full_build_dur.rel_value_us, 
+                                          (unsigned long long) 
full_lp_dur.rel_value_us, 
+                                          (unsigned long long) 
full_mip_dur.rel_value_us);
+                                 if ((0 < opt_update_quantity) || (0 < 
opt_update_percent))
+                                   fprintf (stderr, 
+                                            
"Update;%u;%u;%s;%s;%s;%s;%04llu;%04llu;%04llu\n",
+                                            cp + 1, ca,
+                                            (GNUNET_OK == update_lp_res) ? 
"OK" : "FAIL",
+                                            (GNUNET_OK == update_mip_res) ? 
"OK" : "FAIL",
+                                            (GLP_YES == update_lp_presolv) ? 
"YES" : "NO",
+                                            (GNUNET_OK == update_mip_presolv) 
? "YES" : "NO",
+                                            (unsigned long long) 
update_build_dur.rel_value_us, 
+                                            (unsigned long long) 
update_lp_dur.rel_value_us, 
+                                            (unsigned long long) 
update_mip_dur.rel_value_us);
                                }
                        }
        }

Modified: gnunet/src/ats/test_ats_api_scheduling_block_and_reset.c
===================================================================
--- gnunet/src/ats/test_ats_api_scheduling_block_and_reset.c    2013-08-11 
20:40:36 UTC (rev 28500)
+++ gnunet/src/ats/test_ats_api_scheduling_block_and_reset.c    2013-08-11 
21:21:56 UTC (rev 28501)
@@ -150,44 +150,48 @@
   if (3 == stage)
   {
       /* Suggestion after resetting block interval */
-      reset_block_duration = 
GNUNET_TIME_absolute_get_difference(reset_block_start, 
GNUNET_TIME_absolute_get());
-      GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Address suggestion after resetting 
blocking took about %llu ms!\n",
-                  (long long unsigned int) reset_block_duration.rel_value);
-      if ((block_duration.rel_value <= (initial_duration.rel_value * 3)) ||
-          (initial_duration.rel_value <= (block_duration.rel_value * 3)))
+      reset_block_duration = GNUNET_TIME_absolute_get_difference 
(reset_block_start, 
+                                                                 
GNUNET_TIME_absolute_get());
+      GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+                 "Address suggestion after resetting blocking took about 
%s!\n",
+                  GNUNET_STRINGS_relative_time_to_string (reset_block_duration,
+                                                         GNUNET_YES));
+      if ((block_duration.rel_value_us <= (initial_duration.rel_value_us * 3)) 
||
+          (initial_duration.rel_value_us <= (block_duration.rel_value_us * 3)))
       {
         GNUNET_log (GNUNET_ERROR_TYPE_INFO,
-                    "Address suggestion after resetting blocking (%llu ms) 
took about the same as initial suggestion (%llu ms)\n",
-                    (long long unsigned int) reset_block_duration.rel_value,
-                    (long long unsigned int) initial_duration.rel_value);
+                    "Address suggestion after resetting blocking took about 
the same as initial suggestion (%s)\n",
+                    GNUNET_STRINGS_relative_time_to_string (initial_duration,
+                                                           GNUNET_YES));
         ret = 0;
       }
       else
       {
-        GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Address suggestion after 
resetting blocking (%llu ms) has too big difference to initial suggestion (%llu 
ms)\n",
-                    (long long unsigned int) reset_block_duration.rel_value,
-                    (long long unsigned int) initial_duration.rel_value);
+        GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                   "Address suggestion after resetting blocking has too big 
difference to initial suggestion (%s)\n",
+                    GNUNET_STRINGS_relative_time_to_string (initial_duration,
+                                                           GNUNET_YES));
         ret = 1;
         GNUNET_ATS_suggest_address_cancel (sched_ats, &p.id);
         GNUNET_SCHEDULER_add_now (&end, NULL);
         return;
       }
 
-      if (((initial_duration.rel_value * 3) <= block_duration.rel_value ) &&
-          ((reset_block_duration.rel_value * 3) <= block_duration.rel_value))
+      if (((initial_duration.rel_value_us * 3) <= block_duration.rel_value_us) 
&&
+          ((reset_block_duration.rel_value_us * 3) <= 
block_duration.rel_value_us))
       {
-        GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Address suggestion after 
resetting blocking (%llu ms) and initial suggestion (%llu ms) much faster than 
with blocking (%llu ms)\n",
-                    (long long unsigned int) reset_block_duration.rel_value,
-                    (long long unsigned int) initial_duration.rel_value,
-                    (long long unsigned int) block_duration.rel_value);
+        GNUNET_log (GNUNET_ERROR_TYPE_INFO, 
+                   "Address suggestion after resetting blocking and initial 
suggestion (%llu us) much faster than with blocking (%llu us)\n",
+                    (unsigned long long) initial_duration.rel_value_us,
+                    (unsigned long long) block_duration.rel_value_us);
         ret = 0;
       }
       else
       {
-        GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Address suggestion after 
resetting blocking (%llu ms) and initial suggestion (%llu ms) not faster than 
with blocking (%llu ms)\n",
-                    (long long unsigned int) reset_block_duration.rel_value,
-                    (long long unsigned int) initial_duration.rel_value,
-                    (long long unsigned int) block_duration.rel_value);
+        GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 
+                   "Address suggestion after resetting blocking and initial 
suggestion (%llu us) not faster than with blocking (%llu us)\n",
+                    (unsigned long long) initial_duration.rel_value_us,
+                    (unsigned long long) block_duration.rel_value_us);
         ret = 1;
       }
 
@@ -200,18 +204,22 @@
   {
       /* Suggestion after block*/
       block_duration = GNUNET_TIME_absolute_get_difference(block_start, 
GNUNET_TIME_absolute_get());
-      GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Address suggestion was blocked for 
about %llu ms!\n",
-                  (long long unsigned int) block_duration.rel_value);
+      GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+                 "Address suggestion was blocked for about %s!\n",
+                  GNUNET_STRINGS_relative_time_to_string (block_duration,
+                                                         GNUNET_YES));
 
       if (GNUNET_OK == compare_addresses (address, session, 
&test_hello_address, test_session))
       {
-          GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stage %u: Callback with 
correct address `%s'\n", stage,
+          GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 
+                     "Stage %u: Callback with correct address `%s'\n", stage,
                       GNUNET_i2s (&address->peer));
           ret = 0;
       }
       else
       {
-          GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stage %u: Callback with 
invalid address `%s'\n", stage,
+          GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                     "Stage %u: Callback with invalid address `%s'\n", stage,
                       GNUNET_i2s (&address->peer));
           GNUNET_ATS_suggest_address_cancel (sched_ats, &p.id);
           GNUNET_SCHEDULER_add_now (&end, NULL);
@@ -220,7 +228,8 @@
 
       if (GNUNET_OK != compare_ats(atsi, ats_count, test_ats_info, 
test_ats_count))
       {
-        GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Stage %u: Callback with 
incorrect ats info \n");
+        GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 
+                   "Stage %u: Callback with incorrect ats info \n");
         GNUNET_ATS_suggest_address_cancel (sched_ats, &p.id);
         GNUNET_SCHEDULER_add_now (&end, NULL);
         ret = 1;
@@ -237,13 +246,17 @@
     /* Initial suggestion */
     if (GNUNET_OK == compare_addresses (address, session, &test_hello_address, 
test_session))
     {
-        GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stage %u: Callback with correct 
address `%s'\n", stage,
+        GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 
+                   "Stage %u: Callback with correct address `%s'\n", 
+                   stage,
                     GNUNET_i2s (&address->peer));
         ret = 0;
     }
     else
     {
-        GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stage %u: Callback with invalid 
address `%s'\n", stage,
+        GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 
+                   "Stage %u: Callback with invalid address `%s'\n", 
+                   stage,
                     GNUNET_i2s (&address->peer));
         GNUNET_ATS_suggest_address_cancel (sched_ats, &p.id);
         GNUNET_SCHEDULER_add_now (&end, NULL);
@@ -252,15 +265,20 @@
 
     if (GNUNET_OK != compare_ats(atsi, ats_count, test_ats_info, 
test_ats_count))
     {
-      GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Stage %u: Callback with incorrect 
ats info \n");
+      GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 
+                 "Stage %u: Callback with incorrect ats info\n",
+                 stage);
       GNUNET_ATS_suggest_address_cancel (sched_ats, &p.id);
       GNUNET_SCHEDULER_add_now (&end, NULL);
       ret = 1;
     }
-    stage ++;
+    stage++;
     initial_duration = GNUNET_TIME_absolute_get_difference(initial_start, 
GNUNET_TIME_absolute_get());
-    GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Stage %u: Initial suggestion took 
about %llu ms\n", stage,
-                (long long unsigned int) block_duration.rel_value);
+    GNUNET_log (GNUNET_ERROR_TYPE_INFO, 
+               "Stage %u: Initial suggestion took about %s\n", 
+               stage,
+                GNUNET_STRINGS_relative_time_to_string (block_duration,
+                                                       GNUNET_YES));
 
     block_start = GNUNET_TIME_absolute_get();
     wait_task = GNUNET_SCHEDULER_add_delayed (WAIT, &request_task, NULL);
@@ -270,22 +288,28 @@
     /* Startup suggestion */
     if (GNUNET_OK == compare_addresses (address, session, &test_hello_address, 
test_session))
     {
-        GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stage %u: Callback with correct 
address `%s'\n", stage,
+        GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 
+                   "Stage %u: Callback with correct address `%s'\n", 
+                   stage,
                     GNUNET_i2s (&address->peer));
         ret = 0;
     }
     else
     {
-        GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stage %u: Callback with invalid 
address `%s'\n", stage,
+        GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                   "Stage %u: Callback with invalid address `%s'\n", 
+                   stage,
                     GNUNET_i2s (&address->peer));
         GNUNET_ATS_suggest_address_cancel (sched_ats, &p.id);
         GNUNET_SCHEDULER_add_now (&end, NULL);
         ret = 1;
     }
 
-    if (GNUNET_OK != compare_ats(atsi, ats_count, test_ats_info, 
test_ats_count))
+    if (GNUNET_OK != compare_ats (atsi, ats_count, test_ats_info, 
test_ats_count))
     {
-      GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Stage %u: Callback with incorrect 
ats info \n");
+      GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 
+                 "Stage %u: Callback with incorrect ats info\n",
+                 stage);
       GNUNET_ATS_suggest_address_cancel (sched_ats, &p.id);
       GNUNET_SCHEDULER_add_now (&end, NULL);
       ret = 1;
@@ -312,7 +336,8 @@
   sched_ats = GNUNET_ATS_scheduling_init (cfg, &address_suggest_cb, NULL);
   if (sched_ats == NULL)
   {
-    GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Could not connect to ATS 
scheduling!\n");
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 
+               "Could not connect to ATS scheduling!\n");
     ret = 1;
     end ();
     return;
@@ -321,14 +346,16 @@
   /* Set up peer */
   if (GNUNET_SYSERR == GNUNET_CRYPTO_hash_from_string(PEERID0, 
&p.id.hashPubKey))
   {
-      GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Could not setup peer!\n");
+      GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                 "Could not setup peer!\n");
       ret = GNUNET_SYSERR;
       end ();
       return;
   }
   GNUNET_assert (0 == strcmp (PEERID0, GNUNET_i2s_full (&p.id)));
 
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Created peer `%s'\n",
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+             "Created peer `%s'\n",
               GNUNET_i2s_full(&p.id));
 
   /* Prepare ATS Information */

Modified: gnunet/src/ats/test_ats_api_scheduling_init.c
===================================================================
--- gnunet/src/ats/test_ats_api_scheduling_init.c       2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/ats/test_ats_api_scheduling_init.c       2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -123,7 +123,9 @@
     end_badly_now ();
     return;
   }
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Waiting for %llu sec\n", (long long 
unsigned int) DELAY.rel_value);
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Waiting for %s\n", 
+             GNUNET_STRINGS_relative_time_to_string (DELAY,
+                                                     GNUNET_YES));
   wait_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &delay, 
NULL);
 }
 

Modified: gnunet/src/core/gnunet-service-core_kx.c
===================================================================
--- gnunet/src/core/gnunet-service-core_kx.c    2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/core/gnunet-service-core_kx.c    2013-08-11 21:21:56 UTC (rev 
28501)
@@ -756,7 +756,7 @@
   if ( ( (KX_STATE_KEY_RECEIVED == kx->status) ||
         (KX_STATE_UP == kx->status) ||
         (KX_STATE_REKEY_SENT == kx->status) ) &&       
-       (end_t.abs_value <= kx->foreign_key_expires.abs_value) )
+       (end_t.abs_value_us <= kx->foreign_key_expires.abs_value_us) )
   {
     GNUNET_STATISTICS_update (GSC_stats, gettext_noop ("# old ephemeral keys 
ignored"),
                              1, GNUNET_NO);
@@ -796,15 +796,15 @@
     return;
   }
   now = GNUNET_TIME_absolute_get ();
-  if ( (end_t.abs_value < GNUNET_TIME_absolute_subtract (now, 
REKEY_TOLERANCE).abs_value) ||
-       (start_t.abs_value > GNUNET_TIME_absolute_add (now, 
REKEY_TOLERANCE).abs_value) )
+  if ( (end_t.abs_value_us < GNUNET_TIME_absolute_subtract (now, 
REKEY_TOLERANCE).abs_value_us) ||
+       (start_t.abs_value_us > GNUNET_TIME_absolute_add (now, 
REKEY_TOLERANCE).abs_value_us) )
   {
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                _("Ephemeral key message from peer `%s' rejected as its 
validity range does not match our system time (%llu not in [%llu,%llu]).\n"),
                GNUNET_i2s (&kx->peer),
-               now.abs_value,
-               start_t.abs_value,
-               end_t.abs_value);
+               now.abs_value_us,
+               start_t.abs_value_us,
+               end_t.abs_value_us);
     return;
   }
   if (GNUNET_OK !=
@@ -994,7 +994,7 @@
 
   kx->keep_alive_task = GNUNET_SCHEDULER_NO_TASK;
   left = GNUNET_TIME_absolute_get_remaining (kx->timeout);
-  if (0 == left.rel_value)
+  if (0 == left.rel_value_us)
   {
     GNUNET_STATISTICS_update (GSC_stats,
                               gettext_noop ("# sessions terminated by 
timeout"),
@@ -1300,7 +1300,7 @@
                               1, GNUNET_NO);
     return;
   }
-  if (0 == GNUNET_TIME_absolute_get_remaining 
(kx->foreign_key_expires).rel_value)
+  if (0 == GNUNET_TIME_absolute_get_remaining 
(kx->foreign_key_expires).rel_value_us)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                _("Session to peer `%s' went down due to key expiration (should 
not happen)\n"),
@@ -1394,8 +1394,8 @@
 
   /* check timestamp */
   t = GNUNET_TIME_absolute_ntoh (pt->timestamp);
-  if (GNUNET_TIME_absolute_get_duration (t).rel_value >
-      MAX_MESSAGE_AGE.rel_value)
+  if (GNUNET_TIME_absolute_get_duration (t).rel_value_us >
+      MAX_MESSAGE_AGE.rel_value_us)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Message received far too old (%s). Content ignored.\n",

Modified: gnunet/src/core/gnunet-service-core_sessions.c
===================================================================
--- gnunet/src/core/gnunet-service-core_sessions.c      2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/core/gnunet-service-core_sessions.c      2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2009, 2010, 2011 Christian Grothoff (and other contributing authors)
+     (C) 2009-2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -240,8 +240,8 @@
     delay = TYPEMAP_FREQUENCY;
   }
   /* randomize a bit to avoid spont. sync */
-  delay.rel_value +=
-      GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 1000);
+  delay.rel_value_us +=
+      GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 1000 * 1000);
   session->typemap_task =
       GNUNET_SCHEDULER_add_delayed (delay, &transmit_typemap_task, session);
   GNUNET_STATISTICS_update (GSC_stats,
@@ -409,7 +409,7 @@
   {
     pos = nxt;
     nxt = pos->next;
-    if ((pos->deadline.abs_value < now.abs_value) &&
+    if ((pos->deadline.abs_value_us < now.abs_value_us) &&
         (GNUNET_YES != pos->was_solicited))
     {
       GNUNET_STATISTICS_update (GSC_stats,
@@ -501,7 +501,7 @@
   now = GNUNET_TIME_absolute_get ();
   if ((msize == 0) ||
       ((msize < GNUNET_CONSTANTS_MAX_ENCRYPTED_MESSAGE_SIZE / 2) &&
-       (min_deadline.abs_value > now.abs_value)))
+       (min_deadline.abs_value_us > now.abs_value_us)))
   {
     /* not enough ready yet, try to solicit more */
     solicit_messages (session);

Modified: gnunet/src/core/test_core_api_reliability.c
===================================================================
--- gnunet/src/core/test_core_api_reliability.c 2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/core/test_core_api_reliability.c 2013-08-11 21:21:56 UTC (rev 
28501)
@@ -127,10 +127,10 @@
   p1.th = NULL;
   GNUNET_TRANSPORT_disconnect (p2.th);
   p2.th = NULL;
-  delta = GNUNET_TIME_absolute_get_duration (start_time).rel_value;
+  delta = GNUNET_TIME_absolute_get_duration (start_time).rel_value_us;
   FPRINTF (stderr, "\nThroughput was %llu kb/s\n",
-           total_bytes * 1000 / 1024 / delta);
-  GAUGER ("CORE", "Core throughput/s", total_bytes * 1000 / 1024 / delta,
+           total_bytes * 1000000LL / 1024 / delta);
+  GAUGER ("CORE", "Core throughput/s", total_bytes * 1000000LL / 1024 / delta,
           "kb/s");
   ok = 0;
 }

Modified: gnunet/src/core/test_core_quota_compliance.c
===================================================================
--- gnunet/src/core/test_core_quota_compliance.c        2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/core/test_core_quota_compliance.c        2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -231,10 +231,10 @@
   FPRINTF (stdout, "%s",  "\n");
   running = GNUNET_NO;
 
-  delta = GNUNET_TIME_absolute_get_duration (start_time).rel_value;
+  delta = GNUNET_TIME_absolute_get_duration (start_time).rel_value_us;
 
-  throughput_out = total_bytes_sent * 1000 / delta;     /* convert to bytes/s 
*/
-  throughput_in = total_bytes_recv * 1000 / delta;      /* convert to bytes/s 
*/
+  throughput_out = total_bytes_sent * 1000000LL / delta;     /* convert to 
bytes/s */
+  throughput_in = total_bytes_recv * 1000000LL / delta;      /* convert to 
bytes/s */
 
   max_quota_in = GNUNET_MIN (current_quota_p1_in, current_quota_p2_in);
   max_quota_out = GNUNET_MIN (current_quota_p1_out, current_quota_p2_out);

Modified: gnunet/src/datacache/perf_datacache.c
===================================================================
--- gnunet/src/datacache/perf_datacache.c       2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/datacache/perf_datacache.c       2013-08-11 21:21:56 UTC (rev 
28501)
@@ -96,7 +96,7 @@
           GNUNET_STRINGS_relative_time_to_string 
(GNUNET_TIME_absolute_get_duration (start), GNUNET_YES));
   GNUNET_snprintf (gstr, sizeof (gstr), "DATACACHE-%s", plugin_name);
   GAUGER (gstr, "Time to PUT item in datacache",
-          GNUNET_TIME_absolute_get_duration (start).rel_value / ITERATIONS,
+          GNUNET_TIME_absolute_get_duration (start).rel_value_us / 1000LL / 
ITERATIONS,
           "ms/item");
   start = GNUNET_TIME_absolute_get ();
   memset (&k, 0, sizeof (struct GNUNET_HashCode));
@@ -116,7 +116,7 @@
            ITERATIONS - found);
   if (found > 0)
     GAUGER (gstr, "Time to GET item from datacache",
-            GNUNET_TIME_absolute_get_duration (start).rel_value / found,
+            GNUNET_TIME_absolute_get_duration (start).rel_value_us / 1000LL / 
found,
             "ms/item");
   GNUNET_DATACACHE_destroy (h);
   ASSERT (ok == 0);

Modified: gnunet/src/datacache/plugin_datacache_heap.c
===================================================================
--- gnunet/src/datacache/plugin_datacache_heap.c        2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/datacache/plugin_datacache_heap.c        2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -182,7 +182,7 @@
            put_ctx->path_info_len * sizeof (struct GNUNET_PeerIdentity));   
     GNUNET_CONTAINER_heap_update_cost (put_ctx->heap,
                                       val->hn,
-                                      val->discard_time.abs_value);
+                                      val->discard_time.abs_value_us);
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                "Got same value for key %s and type %d (size %u vs %u)\n",
                GNUNET_h2s (key),
@@ -250,7 +250,7 @@
                                            
GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
   val->hn = GNUNET_CONTAINER_heap_insert (plugin->heap,
                                          val,
-                                         val->discard_time.abs_value);
+                                         val->discard_time.abs_value_us);
   return size + OVERHEAD;
 }
 

Modified: gnunet/src/datacache/plugin_datacache_postgres.c
===================================================================
--- gnunet/src/datacache/plugin_datacache_postgres.c    2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/datacache/plugin_datacache_postgres.c    2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -176,7 +176,7 @@
   struct Plugin *plugin = cls;
   PGresult *ret;
   uint32_t btype = htonl (type);
-  uint64_t bexpi = GNUNET_TIME_absolute_hton (discard_time).abs_value__;
+  uint64_t bexpi = GNUNET_TIME_absolute_hton (discard_time).abs_value_us__;
 
   const char *paramValues[] = {
     (const char *) &btype,
@@ -277,7 +277,7 @@
   }
   for (i = 0; i < cnt; i++)
   {
-    expiration_time.abs_value =
+    expiration_time.abs_value_us =
         GNUNET_ntohll (*(uint64_t *) PQgetvalue (res, i, 0));
     type = ntohl (*(uint32_t *) PQgetvalue (res, i, 1));
     size = PQgetlength (res, i, 2);

Modified: gnunet/src/datacache/plugin_datacache_sqlite.c
===================================================================
--- gnunet/src/datacache/plugin_datacache_sqlite.c      2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/datacache/plugin_datacache_sqlite.c      2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -116,7 +116,7 @@
        "Processing `%s' of %u bytes with key `%4s' and expiration %s\n",
        "PUT", (unsigned int) size, GNUNET_h2s (key),
        GNUNET_STRINGS_relative_time_to_string 
(GNUNET_TIME_absolute_get_remaining (discard_time), GNUNET_YES));
-  dval = (int64_t) discard_time.abs_value;
+  dval = (int64_t) discard_time.abs_value_us;
   if (dval < 0)
     dval = INT64_MAX;
   if (sq_prepare
@@ -203,13 +203,13 @@
                 "sq_prepare");
     return 0;
   }
-  ntime = (int64_t) now.abs_value;
+  ntime = (int64_t) now.abs_value_us;
   GNUNET_assert (ntime >= 0);
   if ((SQLITE_OK !=
        sqlite3_bind_blob (stmt, 1, key, sizeof (struct GNUNET_HashCode),
                           SQLITE_TRANSIENT)) ||
       (SQLITE_OK != sqlite3_bind_int (stmt, 2, type)) ||
-      (SQLITE_OK != sqlite3_bind_int64 (stmt, 3, now.abs_value)))
+      (SQLITE_OK != sqlite3_bind_int64 (stmt, 3, now.abs_value_us)))
   {
     LOG_SQLITE (plugin->dbh, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
                 "sqlite3_bind_xxx");
@@ -256,7 +256,7 @@
          sqlite3_bind_blob (stmt, 1, key, sizeof (struct GNUNET_HashCode),
                             SQLITE_TRANSIENT)) ||
         (SQLITE_OK != sqlite3_bind_int (stmt, 2, type)) ||
-        (SQLITE_OK != sqlite3_bind_int64 (stmt, 3, now.abs_value)))
+        (SQLITE_OK != sqlite3_bind_int64 (stmt, 3, now.abs_value_us)))
     {
       LOG_SQLITE (plugin->dbh, GNUNET_ERROR_TYPE_ERROR | 
GNUNET_ERROR_TYPE_BULK,
                   "sqlite3_bind_xxx");
@@ -267,7 +267,7 @@
       break;
     size = sqlite3_column_bytes (stmt, 0);
     dat = sqlite3_column_blob (stmt, 0);
-    exp.abs_value = sqlite3_column_int64 (stmt, 1);
+    exp.abs_value_us = sqlite3_column_int64 (stmt, 1);
     psize = sqlite3_column_bytes (stmt, 2);
     if (0 != psize % sizeof (struct GNUNET_PeerIdentity))
     {
@@ -279,7 +279,7 @@
       path = sqlite3_column_blob (stmt, 2);
     else
       path = NULL;
-    ntime = (int64_t) exp.abs_value;
+    ntime = (int64_t) exp.abs_value_us;
     if (ntime == INT64_MAX)
       exp = GNUNET_TIME_UNIT_FOREVER_ABS;
     cnt++;

Modified: gnunet/src/datacache/test_datacache.c
===================================================================
--- gnunet/src/datacache/test_datacache.c       2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/datacache/test_datacache.c       2013-08-11 21:21:56 UTC (rev 
28501)
@@ -80,7 +80,7 @@
     return;
   }
   exp = GNUNET_TIME_absolute_get ();
-  exp.abs_value += 5 * 60 * 1000;
+  exp.abs_value_us += 5 * 60 * 1000 * 1000LL;
   memset (&k, 0, sizeof (struct GNUNET_HashCode));
   for (i = 0; i < 100; i++)
   {

Modified: gnunet/src/datacache/test_datacache_quota.c
===================================================================
--- gnunet/src/datacache/test_datacache_quota.c 2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/datacache/test_datacache_quota.c 2013-08-11 21:21:56 UTC (rev 
28501)
@@ -71,7 +71,7 @@
     GNUNET_CRYPTO_hash (&k, sizeof (struct GNUNET_HashCode), &n);
     for (j = i; j < sizeof (buf); j += 10)
     {
-      exp.abs_value++;
+      exp.abs_value_us++;
       buf[j] = i;
       ASSERT (GNUNET_OK == GNUNET_DATACACHE_put (h, &k, j, buf, 1 + i, exp, 0, 
NULL));
       ASSERT (0 < GNUNET_DATACACHE_get (h, &k, 1 + i, NULL, NULL));

Modified: gnunet/src/datastore/datastore_api.c
===================================================================
--- gnunet/src/datastore/datastore_api.c        2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/datastore/datastore_api.c        2013-08-11 21:21:56 UTC (rev 
28501)
@@ -850,9 +850,10 @@
   union QueueContext qc;
 
   LOG (GNUNET_ERROR_TYPE_DEBUG,
-       "Asked to put %u bytes of data under key `%s' for %llu ms\n", size,
+       "Asked to put %u bytes of data under key `%s' for %s\n", size,
        GNUNET_h2s (key),
-       GNUNET_TIME_absolute_get_remaining (expiration).rel_value);
+       GNUNET_STRINGS_relative_time_to_string 
(GNUNET_TIME_absolute_get_remaining (expiration),
+                                              GNUNET_YES));
   msize = sizeof (struct DataMessage) + size;
   GNUNET_assert (msize < GNUNET_SERVER_MAX_MESSAGE_SIZE);
   qc.sc.cont = cont;
@@ -1037,8 +1038,10 @@
   if (cont == NULL)
     cont = &drop_status_cont;
   LOG (GNUNET_ERROR_TYPE_DEBUG,
-       "Asked to update entry %llu raising priority by %u and expiration to 
%llu\n",
-       uid, (unsigned int) priority, (unsigned long long) 
expiration.abs_value);
+       "Asked to update entry %llu raising priority by %u and expiration to 
%s\n",
+       uid, 
+       (unsigned int) priority,
+       GNUNET_STRINGS_absolute_time_to_string (expiration));
   qc.sc.cont = cont;
   qc.sc.cont_cls = cont_cls;
   qe = make_queue_entry (h, sizeof (struct UpdateMessage), queue_priority,
@@ -1268,8 +1271,9 @@
   union QueueContext qc;
 
   GNUNET_assert (NULL != proc);
-  LOG (GNUNET_ERROR_TYPE_DEBUG, "Asked to get replication entry in %llu ms\n",
-       (unsigned long long) timeout.rel_value);
+  LOG (GNUNET_ERROR_TYPE_DEBUG,
+       "Asked to get replication entry in %s\n",
+       GNUNET_STRINGS_relative_time_to_string (timeout, GNUNET_YES));
   qc.rc.proc = proc;
   qc.rc.proc_cls = proc_cls;
   qe = make_queue_entry (h, sizeof (struct GNUNET_MessageHeader),
@@ -1330,9 +1334,9 @@
   GNUNET_assert (NULL != proc);
   GNUNET_assert (type != GNUNET_BLOCK_TYPE_ANY);
   LOG (GNUNET_ERROR_TYPE_DEBUG,
-       "Asked to get %llu-th zero-anonymity entry of type %d in %llu ms\n",
+       "Asked to get %llu-th zero-anonymity entry of type %d in %s\n",
        (unsigned long long) offset, type,
-       (unsigned long long) timeout.rel_value);
+       GNUNET_STRINGS_relative_time_to_string (timeout, GNUNET_YES));
   qc.rc.proc = proc;
   qc.rc.proc_cls = proc_cls;
   qe = make_queue_entry (h, sizeof (struct GetZeroAnonymityMessage),

Modified: gnunet/src/datastore/gnunet-service-datastore.c
===================================================================
--- gnunet/src/datastore/gnunet-service-datastore.c     2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/datastore/gnunet-service-datastore.c     2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -332,7 +332,7 @@
     return GNUNET_SYSERR;
   }
   now = GNUNET_TIME_absolute_get ();
-  if (expiration.abs_value > now.abs_value)
+  if (expiration.abs_value_us > now.abs_value_us)
   {
     /* finished processing */
     expired_kill_task =
@@ -342,9 +342,11 @@
     return GNUNET_SYSERR;
   }
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "Deleting content `%s' of type %u that expired %llu ms ago\n",
+              "Deleting content `%s' of type %u that expired %s ago\n",
               GNUNET_h2s (key), type,
-              (unsigned long long) (now.abs_value - expiration.abs_value));
+             GNUNET_STRINGS_relative_time_to_string 
(GNUNET_TIME_absolute_get_difference (expiration,
+                                                                               
           now),
+                                                     GNUNET_YES));
   min_expiration = now;
   GNUNET_STATISTICS_update (stats, gettext_noop ("# bytes expired"), size,
                             GNUNET_YES);
@@ -404,11 +406,12 @@
   if (NULL == key)
     return GNUNET_SYSERR;
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "Deleting %llu bytes of low-priority (%u) content `%s' of type 
%u at %llu ms prior to expiration (still trying to free another %llu bytes)\n",
+              "Deleting %llu bytes of low-priority (%u) content `%s' of type 
%u at %s prior to expiration (still trying to free another %llu bytes)\n",
               (unsigned long long) (size + GNUNET_DATASTORE_ENTRY_OVERHEAD),
              (unsigned int) priority,
               GNUNET_h2s (key), type, 
-             (unsigned long long) GNUNET_TIME_absolute_get_remaining 
(expiration).rel_value,
+             GNUNET_STRINGS_relative_time_to_string 
(GNUNET_TIME_absolute_get_remaining (expiration),
+                                                     GNUNET_YES),
              *need);
   if (size + GNUNET_DATASTORE_ENTRY_OVERHEAD > *need)
     *need = 0;
@@ -619,10 +622,11 @@
   dm->key = *key;
   memcpy (&dm[1], data, size);
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "Transmitting `%s' message for `%s' of type %u with expiration 
%llu (now: %llu)\n",
+              "Transmitting `%s' message for `%s' of type %u with expiration 
%s (in: %s)\n",
               "DATA", GNUNET_h2s (key), type,
-              (unsigned long long) expiration.abs_value,
-              (unsigned long long) GNUNET_TIME_absolute_get ().abs_value);
+              GNUNET_STRINGS_absolute_time_to_string (expiration),
+              GNUNET_STRINGS_relative_time_to_string 
(GNUNET_TIME_absolute_get_remaining (expiration),
+                                                     GNUNET_YES));
   GNUNET_STATISTICS_update (stats, gettext_noop ("# results found"), 1,
                             GNUNET_NO);
   transmit (client, &dm->header);
@@ -896,8 +900,8 @@
                 "Result already present in datastore\n");
     /* FIXME: change API to allow increasing 'replication' counter */
     if ((ntohl (dm->priority) > 0) ||
-        (GNUNET_TIME_absolute_ntoh (dm->expiration).abs_value >
-         expiration.abs_value))
+        (GNUNET_TIME_absolute_ntoh (dm->expiration).abs_value_us >
+         expiration.abs_value_us))
       plugin->api->update (plugin->api->cls, uid,
                            (int32_t) ntohl (dm->priority),
                            GNUNET_TIME_absolute_ntoh (dm->expiration), NULL);

Modified: gnunet/src/datastore/perf_datastore_api.c
===================================================================
--- gnunet/src/datastore/perf_datastore_api.c   2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/datastore/perf_datastore_api.c   2013-08-11 21:21:56 UTC (rev 
28501)
@@ -245,9 +245,9 @@
 #endif
              "Stored %llu kB / %lluk ops / %llu ops/s\n", stored_bytes / 1024, 
 /* used size in k */
              stored_ops / 1024, /* total operations (in k) */
-             1000 * stored_ops / (1 +
-                                  GNUNET_TIME_absolute_get_duration
-                                  (start_time).rel_value));
+             1000LL * 1000LL * stored_ops / (1 +
+                                            GNUNET_TIME_absolute_get_duration
+                                            (start_time).rel_value_us));
     crc->phase = RP_PUT;
     crc->j = 0;
     GNUNET_SCHEDULER_add_continuation (&run_continuation, crc,
@@ -257,7 +257,7 @@
     GNUNET_snprintf (gstr, sizeof (gstr), "DATASTORE-%s", plugin_name);
     if ((crc->i == ITERATIONS) && (stored_ops > 0))
       GAUGER (gstr, "PUT operation duration",
-              GNUNET_TIME_absolute_get_duration (start_time).rel_value /
+              GNUNET_TIME_absolute_get_duration (start_time).rel_value_us / 
1000LL /
               stored_ops, "ms/operation");
     GNUNET_DATASTORE_disconnect (datastore, GNUNET_YES);
     GNUNET_free (crc);

Modified: gnunet/src/datastore/perf_plugin_datastore.c
===================================================================
--- gnunet/src/datastore/perf_plugin_datastore.c        2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/datastore/perf_plugin_datastore.c        2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -115,7 +115,7 @@
   size = size - (size & 7);     /* always multiple of 8 */
 
   /* generate random key */
-  key.bits[0] = (unsigned int) GNUNET_TIME_absolute_get ().abs_value;
+  key.bits[0] = (unsigned int) GNUNET_TIME_absolute_get ().abs_value_us;
   GNUNET_CRYPTO_hash (&key, sizeof (struct GNUNET_HashCode), &key);
   memset (value, i, size);
   if (i > 255)
@@ -164,9 +164,10 @@
   hits[i / 8] |= (1 << (i % 8));
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 
-             "Found result %d type=%u, priority=%u, size=%u, expire=%llu\n",
+             "Found result %d type=%u, priority=%u, size=%u, expire=%s\n",
              i,
-             type, priority, size, (unsigned long long) expiration.abs_value);
+             type, priority, size, 
+             GNUNET_STRINGS_absolute_time_to_string (expiration));
   crc->cnt++;
   if (crc->cnt == PUT_10 / 4 - 1)
   {
@@ -178,13 +179,15 @@
         bc++;
 
     crc->end = GNUNET_TIME_absolute_get ();
-    printf ("%s took %llu ms yielding %u/%u items\n",
+    printf ("%s took %s yielding %u/%u items\n",
             "Select random zero-anonymity item",
-            (unsigned long long) (crc->end.abs_value - crc->start.abs_value),
+            GNUNET_STRINGS_relative_time_to_string 
(GNUNET_TIME_absolute_get_difference (crc->start,
+                                                                               
         crc->end),
+                                                   GNUNET_YES),
             bc, crc->cnt);
     if (crc->cnt > 0)
       GAUGER (category, "Select random zero-anonymity item",
-              (crc->end.abs_value - crc->start.abs_value) / crc->cnt,
+              (crc->end.abs_value_us - crc->start.abs_value_us) / 1000LL / 
crc->cnt,
               "ms/item");
     memset (hits, 0, sizeof (hits));
     crc->phase++;
@@ -220,13 +223,15 @@
         bc++;
 
     crc->end = GNUNET_TIME_absolute_get ();
-    printf ("%s took %llu ms yielding %u/%u items\n",
+    printf ("%s took %s yielding %u/%u items\n",
             "Selecting and deleting by expiration",
-            (unsigned long long) (crc->end.abs_value - crc->start.abs_value),
+            GNUNET_STRINGS_relative_time_to_string 
(GNUNET_TIME_absolute_get_difference (crc->start,
+                                                                               
         crc->end),
+                                                   GNUNET_YES),
             bc, (unsigned int) PUT_10);
     if (crc->cnt > 0)
       GAUGER (category, "Selecting and deleting by expiration",
-              (crc->end.abs_value - crc->start.abs_value) / crc->cnt,
+              (crc->end.abs_value_us - crc->start.abs_value_us) / 1000LL / 
crc->cnt,
               "ms/item");
     memset (hits, 0, sizeof (hits));
     if (++crc->iter == ITERATIONS)
@@ -266,13 +271,15 @@
         bc++;
 
     crc->end = GNUNET_TIME_absolute_get ();
-    printf ("%s took %llu ms yielding %u/%u items\n",
+    printf ("%s took %s yielding %u/%u items\n",
             "Selecting random item for replication",
-            (unsigned long long) (crc->end.abs_value - crc->start.abs_value),
+            GNUNET_STRINGS_relative_time_to_string 
(GNUNET_TIME_absolute_get_difference (crc->start,
+                                                                               
         crc->end),
+                                                   GNUNET_YES),
             bc, (unsigned int) PUT_10);
     if (crc->cnt > 0)
       GAUGER (category, "Selecting random item for replication",
-              (crc->end.abs_value - crc->start.abs_value) / crc->cnt,
+              (crc->end.abs_value_us - crc->start.abs_value_us) / 1000LL / 
crc->cnt,
               "ms/item");
     memset (hits, 0, sizeof (hits));
     crc->phase++;
@@ -359,12 +366,14 @@
       putValue (crc->api, j, crc->i);
     crc->end = GNUNET_TIME_absolute_get ();
     {
-      printf ("%s took %llu ms for %llu items\n", "Storing an item",
-              (unsigned long long) (crc->end.abs_value - crc->start.abs_value),
+      printf ("%s took %s for %llu items\n", "Storing an item",
+             GNUNET_STRINGS_relative_time_to_string 
(GNUNET_TIME_absolute_get_difference (crc->start,
+                                                                               
           crc->end),
+                                                     GNUNET_YES),
               PUT_10);
       if (PUT_10 > 0)
         GAUGER (category, "Storing an item",
-                (crc->end.abs_value - crc->start.abs_value) / PUT_10,
+                (crc->end.abs_value_us - crc->start.abs_value_us) / 1000LL / 
PUT_10,
                 "ms/item");
     }
     crc->i++;

Modified: gnunet/src/datastore/plugin_datastore_heap.c
===================================================================
--- gnunet/src/datastore/plugin_datastore_heap.c        2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/datastore/plugin_datastore_heap.c        2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -226,7 +226,7 @@
   value->data = &value[1];
   value->expire_heap = GNUNET_CONTAINER_heap_insert (plugin->by_expiration,
                                                     value,
-                                                    expiration.abs_value);
+                                                    expiration.abs_value_us);
   value->replication_heap = GNUNET_CONTAINER_heap_insert 
(plugin->by_replication,
                                                          value,
                                                          replication);
@@ -628,12 +628,12 @@
 
   value = (struct Value*) (long) uid;
   GNUNET_assert (NULL != value);
-  if (value->expiration.abs_value != expire.abs_value)
+  if (value->expiration.abs_value_us != expire.abs_value_us)
   {
     value->expiration = expire;
     GNUNET_CONTAINER_heap_update_cost (plugin->by_expiration,
                                       value->expire_heap,
-                                      expire.abs_value);
+                                      expire.abs_value_us);
   }
   if ( (delta < 0) && (value->priority < - delta) )
     value->priority = 0;

Modified: gnunet/src/datastore/plugin_datastore_mysql.c
===================================================================
--- gnunet/src/datastore/plugin_datastore_mysql.c       2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/datastore/plugin_datastore_mysql.c       2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -290,7 +290,7 @@
   unsigned int irepl = replication;
   unsigned int ipriority = priority;
   unsigned int ianonymity = anonymity;
-  unsigned long long lexpiration = expiration.abs_value;
+  unsigned long long lexpiration = expiration.abs_value_us;
   unsigned long long lrvalue =
       (unsigned long long) GNUNET_CRYPTO_random_u64 
(GNUNET_CRYPTO_QUALITY_WEAK,
                                                      UINT64_MAX);
@@ -358,12 +358,13 @@
 {
   struct Plugin *plugin = cls;
   unsigned long long vkey = uid;
-  unsigned long long lexpire = expire.abs_value;
+  unsigned long long lexpire = expire.abs_value_us;
   int ret;
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "Updating value %llu adding %d to priority and maxing exp at 
%llu\n",
-              vkey, delta, lexpire);
+              "Updating value %llu adding %d to priority and maxing exp at 
%s\n",
+              vkey, delta, 
+             GNUNET_STRINGS_absolute_time_to_string (expire));
   ret =
     GNUNET_MYSQL_statement_run_prepared (plugin->mc, plugin->update_entry, 
NULL,
                                         MYSQL_TYPE_LONG, &delta, GNUNET_NO,
@@ -449,11 +450,13 @@
     proc (proc_cls, NULL, 0, NULL, 0, 0, 0, GNUNET_TIME_UNIT_ZERO_ABS, 0);
     return;
   }
+  expiration.abs_value_us = exp;
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "Found %u-byte value under key `%s' with prio %u, anon %u, 
expire %llu selecting from gn090 table\n",
-              (unsigned int) size, GNUNET_h2s (&key), priority, anonymity, 
exp);
+              "Found %u-byte value under key `%s' with prio %u, anon %u, 
expire %s selecting from gn090 table\n",
+              (unsigned int) size, GNUNET_h2s (&key),
+             priority, anonymity, 
+             GNUNET_STRINGS_absolute_time_to_string (expiration));
   GNUNET_assert (size < MAX_DATUM_SIZE);
-  expiration.abs_value = exp;
   ret =
       proc (proc_cls, &key, size, value, type, priority, anonymity, expiration,
             uid);
@@ -907,7 +910,7 @@
   rc.plugin = plugin;
   rc.proc = proc;
   rc.proc_cls = proc_cls;
-  nt = (long long) GNUNET_TIME_absolute_get ().abs_value;
+  nt = (long long) GNUNET_TIME_absolute_get ().abs_value_us;
   execute_select (plugin, plugin->select_expiration, expi_proc, &rc,
                   MYSQL_TYPE_LONGLONG, &nt, GNUNET_YES, -1);
 

Modified: gnunet/src/datastore/plugin_datastore_postgres.c
===================================================================
--- gnunet/src/datastore/plugin_datastore_postgres.c    2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/datastore/plugin_datastore_postgres.c    2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet
-     (C) 2009, 2010, 2011, 2012 Christian Grothoff (and other contributing 
authors)
+     (C) 2009-2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -283,7 +283,7 @@
   uint32_t bprio = htonl (priority);
   uint32_t banon = htonl (anonymity);
   uint32_t brepl = htonl (replication);
-  uint64_t bexpi = GNUNET_TIME_absolute_hton (expiration).abs_value__;
+  uint64_t bexpi = GNUNET_TIME_absolute_hton (expiration).abs_value_us__;
 
   const char *paramValues[] = {
     (const char *) &brepl,
@@ -392,7 +392,7 @@
   type = ntohl (*(uint32_t *) PQgetvalue (res, 0, 0));
   priority = ntohl (*(uint32_t *) PQgetvalue (res, 0, 1));
   anonymity = ntohl (*(uint32_t *) PQgetvalue (res, 0, 2));
-  expiration_time.abs_value =
+  expiration_time.abs_value_us =
       GNUNET_ntohll (*(uint64_t *) PQgetvalue (res, 0, 3));
   memcpy (&key, PQgetvalue (res, 0, 4), sizeof (struct GNUNET_HashCode));
   size = PQgetlength (res, 0, 5);
@@ -712,7 +712,7 @@
   const char *paramValues[] = { (const char *) &btime };
   PGresult *ret;
 
-  btime = GNUNET_htonll (GNUNET_TIME_absolute_get ().abs_value);
+  btime = GNUNET_htonll (GNUNET_TIME_absolute_get ().abs_value_us);
   ret =
       PQexecPrepared (plugin->dbh, "select_expiration_order", 1, paramValues,
                       paramLengths, paramFormats, 1);
@@ -751,7 +751,7 @@
   PGresult *ret;
   int32_t bdelta = (int32_t) htonl ((uint32_t) delta);
   uint32_t boid = htonl ((uint32_t) uid);
-  uint64_t bexpire = GNUNET_TIME_absolute_hton (expire).abs_value__;
+  uint64_t bexpire = GNUNET_TIME_absolute_hton (expire).abs_value_us__;
 
   const char *paramValues[] = {
     (const char *) &bdelta,

Modified: gnunet/src/datastore/plugin_datastore_sqlite.c
===================================================================
--- gnunet/src/datastore/plugin_datastore_sqlite.c      2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/datastore/plugin_datastore_sqlite.c      2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -488,11 +488,12 @@
   if (size > MAX_ITEM_SIZE)
     return GNUNET_SYSERR;
   GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "sqlite",
-                   "Storing in database block with type %u/key `%s'/priority 
%u/expiration in %llu ms (%lld).\n",
+                   "Storing in database block with type %u/key `%s'/priority 
%u/expiration in %s (%s).\n",
                    type, GNUNET_h2s (key), priority,
                    (unsigned long long)
-                   GNUNET_TIME_absolute_get_remaining (expiration).rel_value,
-                   (long long) expiration.abs_value);
+                   GNUNET_STRINGS_relative_time_to_string 
(GNUNET_TIME_absolute_get_remaining (expiration),
+                                                          GNUNET_YES),
+                   GNUNET_STRINGS_absolute_time_to_string (expiration));
   GNUNET_CRYPTO_hash (data, size, &vhash);
   stmt = plugin->insertContent;
   rvalue = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK, UINT64_MAX);
@@ -500,7 +501,7 @@
       (SQLITE_OK != sqlite3_bind_int (stmt, 2, type)) ||
       (SQLITE_OK != sqlite3_bind_int (stmt, 3, priority)) ||
       (SQLITE_OK != sqlite3_bind_int (stmt, 4, anonymity)) ||
-      (SQLITE_OK != sqlite3_bind_int64 (stmt, 5, expiration.abs_value)) ||
+      (SQLITE_OK != sqlite3_bind_int64 (stmt, 5, expiration.abs_value_us)) ||
       (SQLITE_OK != sqlite3_bind_int64 (stmt, 6, rvalue)) ||
       (SQLITE_OK !=
        sqlite3_bind_blob (stmt, 7, key, sizeof (struct GNUNET_HashCode),
@@ -583,7 +584,7 @@
   int n;
 
   if ((SQLITE_OK != sqlite3_bind_int (plugin->updPrio, 1, delta)) ||
-      (SQLITE_OK != sqlite3_bind_int64 (plugin->updPrio, 2, expire.abs_value))
+      (SQLITE_OK != sqlite3_bind_int64 (plugin->updPrio, 2, 
expire.abs_value_us))
       || (SQLITE_OK != sqlite3_bind_int64 (plugin->updPrio, 3, uid)))
   {
     LOG_SQLITE (plugin, msg, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
@@ -655,10 +656,10 @@
                           -(size + GNUNET_DATASTORE_ENTRY_OVERHEAD));
       break;
     }
-    expiration.abs_value = sqlite3_column_int64 (stmt, 3);
+    expiration.abs_value_us = sqlite3_column_int64 (stmt, 3);
     GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "sqlite",
-                     "Found reply in database with expiration %llu\n",
-                     (unsigned long long) expiration.abs_value);
+                     "Found reply in database with expiration %s\n",
+                     GNUNET_STRINGS_absolute_time_to_string (expiration));
     ret = proc (proc_cls, sqlite3_column_blob (stmt, 4) /* key */ ,
                 size, sqlite3_column_blob (stmt, 5) /* data */ ,
                 sqlite3_column_int (stmt, 0) /* type */ ,
@@ -1040,7 +1041,7 @@
                    "Getting random block based on expiration and priority 
order.\n");
   now = GNUNET_TIME_absolute_get ();
   stmt = plugin->selExpi;
-  if (SQLITE_OK != sqlite3_bind_int64 (stmt, 1, now.abs_value))
+  if (SQLITE_OK != sqlite3_bind_int64 (stmt, 1, now.abs_value_us))
   {
     LOG_SQLITE (plugin, NULL, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
                 "sqlite3_bind_XXXX");

Modified: gnunet/src/datastore/test_datastore_api.c
===================================================================
--- gnunet/src/datastore/test_datastore_api.c   2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/datastore/test_datastore_api.c   2013-08-11 21:21:56 UTC (rev 
28501)
@@ -94,7 +94,7 @@
 {
   struct GNUNET_TIME_Absolute av;
 
-  av.abs_value = now.abs_value + 20000000 - i * 1000;
+  av.abs_value_us = now.abs_value_us + 20000000000LL - i * 1000 * 1000LL;
   return av;
 }
 
@@ -191,20 +191,21 @@
     return;
   }
 #if 0
-  FPRINTF (stderr, "Check value got `%s' of size %u, type %d, expire %llu\n",
+  FPRINTF (stderr, 
+          "Check value got `%s' of size %u, type %d, expire %s\n",
            GNUNET_h2s (key), (unsigned int) size, type,
-           (unsigned long long) expiration.abs_value);
+           GNUNET_STRINGS_absolute_time_to_string (expiration));
   FPRINTF (stderr,
-           "Check value iteration %d wants size %u, type %d, expire %llu\n", i,
+           "Check value iteration %d wants size %u, type %d, expire %s\n", i,
            (unsigned int) get_size (i), get_type (i),
-           (unsigned long long) get_expiration (i).abs_value);
+           GNUNET_STRINGS_absolute_time_to_string (get_expiration(i)));
 #endif
   GNUNET_assert (size == get_size (i));
   GNUNET_assert (0 == memcmp (data, get_data (i), size));
   GNUNET_assert (type == get_type (i));
   GNUNET_assert (priority == get_priority (i));
   GNUNET_assert (anonymity == get_anonymity (i));
-  GNUNET_assert (expiration.abs_value == get_expiration (i).abs_value);
+  GNUNET_assert (expiration.abs_value_us == get_expiration (i).abs_value_us);
   crc->offset++;
   if (crc->i == 0)
   {

Modified: gnunet/src/datastore/test_datastore_api_management.c
===================================================================
--- gnunet/src/datastore/test_datastore_api_management.c        2013-08-11 
20:40:36 UTC (rev 28500)
+++ gnunet/src/datastore/test_datastore_api_management.c        2013-08-11 
21:21:56 UTC (rev 28501)
@@ -113,7 +113,7 @@
 {
   struct GNUNET_TIME_Absolute av;
 
-  av.abs_value = now.abs_value + i * 1000;
+  av.abs_value_us = now.abs_value_us + i * 1000 * 1000LL;
   return av;
 }
 
@@ -159,7 +159,7 @@
   GNUNET_assert (type == get_type (i));
   GNUNET_assert (priority == get_priority (i));
   GNUNET_assert (anonymity == get_anonymity (i));
-  GNUNET_assert (expiration.abs_value == get_expiration (i).abs_value);
+  GNUNET_assert (expiration.abs_value_us == get_expiration (i).abs_value_us);
   crc->offset++;
   crc->i--;
   if (crc->i == 0)

Modified: gnunet/src/datastore/test_plugin_datastore.c
===================================================================
--- gnunet/src/datastore/test_plugin_datastore.c        2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/datastore/test_plugin_datastore.c        2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -158,8 +158,9 @@
   guid = uid;
   crc->phase++;
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-             "Found result type=%u, priority=%u, size=%u, expire=%llu, key 
%s\n",
-             type, priority, size, (unsigned long long) expiration.abs_value,
+             "Found result type=%u, priority=%u, size=%u, expire=%s, key %s\n",
+             type, priority, size,
+             GNUNET_STRINGS_absolute_time_to_string (expiration),
              GNUNET_h2s (key));
   GNUNET_SCHEDULER_add_now (&test, crc);
   return GNUNET_OK;

Modified: gnunet/src/dht/gnunet-service-dht_clients.c
===================================================================
--- gnunet/src/dht/gnunet-service-dht_clients.c 2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/dht/gnunet-service-dht_clients.c 2013-08-11 21:21:56 UTC (rev 
28501)
@@ -461,11 +461,11 @@
   {
     cqr->hnode = NULL;
     delay = GNUNET_TIME_absolute_get_remaining (cqr->retry_time);
-    if (delay.rel_value > 0)
+    if (delay.rel_value_us > 0)
     {
       cqr->hnode =
           GNUNET_CONTAINER_heap_insert (retry_heap, cqr,
-                                        cqr->retry_time.abs_value);
+                                        cqr->retry_time.abs_value_us);
       retry_task =
           GNUNET_SCHEDULER_add_delayed (delay, &transmit_next_request_task,
                                         NULL);
@@ -474,7 +474,7 @@
     transmit_request (cqr);
     cqr->hnode =
         GNUNET_CONTAINER_heap_insert (retry_heap, cqr,
-                                      cqr->retry_time.abs_value);
+                                      cqr->retry_time.abs_value_us);
   }
 }
 

Modified: gnunet/src/dht/gnunet-service-dht_hello.c
===================================================================
--- gnunet/src/dht/gnunet-service-dht_hello.c   2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/dht/gnunet-service-dht_hello.c   2013-08-11 21:21:56 UTC (rev 
28501)
@@ -76,7 +76,7 @@
   if (hello == NULL)
     return;
   ex = GNUNET_HELLO_get_last_expiration (hello);
-  if (GNUNET_TIME_absolute_get_remaining (ex).rel_value == 0)
+  if (0 == GNUNET_TIME_absolute_get_remaining (ex).rel_value_us)
     return;
   GNUNET_STATISTICS_update (GDS_stats,
                             gettext_noop ("# HELLOs obtained from peerinfo"), 
1,

Modified: gnunet/src/dht/gnunet-service-dht_neighbours.c
===================================================================
--- gnunet/src/dht/gnunet-service-dht_neighbours.c      2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/dht/gnunet-service-dht_neighbours.c      2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2009, 2010, 2011 Christian Grothoff (and other contributing authors)
+     (C) 2009-2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -602,10 +602,10 @@
   GNUNET_CONTAINER_bloomfilter_free (peer_bf);
   GNUNET_CONTAINER_bloomfilter_free (bcc.bloom);
   /* schedule next round */
-  next_send_time.rel_value =
-      DHT_MINIMUM_FIND_PEER_INTERVAL.rel_value +
+  next_send_time.rel_value_us =
+      DHT_MINIMUM_FIND_PEER_INTERVAL.rel_value_us +
       GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK,
-                                DHT_MAXIMUM_FIND_PEER_INTERVAL.rel_value /
+                                DHT_MAXIMUM_FIND_PEER_INTERVAL.rel_value_us /
                                 (newly_found_peers + 1));
   newly_found_peers = 0;
   find_peer_task =
@@ -757,7 +757,7 @@
 
   peer->th = NULL;
   while ((NULL != (pending = peer->head)) &&
-         (GNUNET_TIME_absolute_get_remaining (pending->timeout).rel_value == 
0))
+         (0 == GNUNET_TIME_absolute_get_remaining 
(pending->timeout).rel_value_us))
   {
     peer->pending_count--;
     GNUNET_CONTAINER_DLL_remove (peer->head, peer->tail, pending);

Modified: gnunet/src/dht/gnunet-service-dht_routing.c
===================================================================
--- gnunet/src/dht/gnunet-service-dht_routing.c 2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/dht/gnunet-service-dht_routing.c 2013-08-11 21:21:56 UTC (rev 
28501)
@@ -421,7 +421,7 @@
   }
   recent_req->heap_node =
       GNUNET_CONTAINER_heap_insert (recent_heap, recent_req,
-                                    GNUNET_TIME_absolute_get ().abs_value);
+                                    GNUNET_TIME_absolute_get ().abs_value_us);
   GNUNET_CONTAINER_multihashmap_put (recent_map, key, recent_req,
                                      
GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
 

Modified: gnunet/src/dns/dnsparser.c
===================================================================
--- gnunet/src/dns/dnsparser.c  2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/dns/dnsparser.c  2013-08-11 21:21:56 UTC (rev 28501)
@@ -891,7 +891,7 @@
   }
   rl.type = htons (record->type);
   rl.class = htons (record->class);
-  rl.ttl = htonl (GNUNET_TIME_absolute_get_remaining 
(record->expiration_time).rel_value / 1000); /* in seconds */
+  rl.ttl = htonl (GNUNET_TIME_absolute_get_remaining 
(record->expiration_time).rel_value_us / 1000LL / 1000LL); /* in seconds */
   rl.data_len = htons ((uint16_t) (pos - (*off + sizeof (struct 
record_line))));
   memcpy (&dst[*off], &rl, sizeof (struct record_line));
   *off = pos;

Modified: gnunet/src/dns/dnsstub.c
===================================================================
--- gnunet/src/dns/dnsstub.c    2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/dns/dnsstub.c    2013-08-11 21:21:56 UTC (rev 28501)
@@ -447,7 +447,7 @@
         (0 != memcmp (&rs->addr,
                       &addr,
                       addrlen)) ||      
-       (0 == GNUNET_TIME_absolute_get_remaining (rs->timeout).rel_value) )
+       (0 == GNUNET_TIME_absolute_get_remaining (rs->timeout).rel_value_us) )
     {
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                  "Request timeout or invalid sender address; ignoring 
reply\n"); 

Modified: gnunet/src/dns/gnunet-dns-monitor.c
===================================================================
--- gnunet/src/dns/gnunet-dns-monitor.c 2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/dns/gnunet-dns-monitor.c 2013-08-11 21:21:56 UTC (rev 28501)
@@ -214,7 +214,7 @@
           get_type (record->type),
           record->name,
           format,
-          (unsigned int) (GNUNET_TIME_absolute_get_remaining 
(record->expiration_time).rel_value / 1000));
+          (unsigned int) (GNUNET_TIME_absolute_get_remaining 
(record->expiration_time).rel_value_us / 1000LL / 1000LL));
   GNUNET_free_non_null (tmp);
 }
 

Modified: gnunet/src/dns/plugin_block_dns.c
===================================================================
--- gnunet/src/dns/plugin_block_dns.c   2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/dns/plugin_block_dns.c   2013-08-11 21:21:56 UTC (rev 28501)
@@ -87,7 +87,7 @@
 
     if (0 ==
         GNUNET_TIME_absolute_get_remaining (GNUNET_TIME_absolute_ntoh
-                                            (rec->expiration_time)).rel_value)
+                                            
(rec->expiration_time)).rel_value_us)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "DNS-Block is invalid: Timeout\n");
       return GNUNET_BLOCK_EVALUATION_RESULT_INVALID;

Modified: gnunet/src/exit/gnunet-daemon-exit.c
===================================================================
--- gnunet/src/exit/gnunet-daemon-exit.c        2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/exit/gnunet-daemon-exit.c        2013-08-11 21:21:56 UTC (rev 
28501)
@@ -674,7 +674,7 @@
   if (NULL == state_key)
     GNUNET_CONTAINER_heap_update_cost (connections_heap, 
                                       state->specifics.tcp_udp.heap_node,
-                                      GNUNET_TIME_absolute_get ().abs_value);
+                                      GNUNET_TIME_absolute_get 
().abs_value_us);
   return state;
 }
 
@@ -1497,7 +1497,7 @@
                                                    
GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
   state->specifics.tcp_udp.heap_node = GNUNET_CONTAINER_heap_insert 
(connections_heap,
                                                   state,
-                                                  GNUNET_TIME_absolute_get 
().abs_value);   
+                                                  GNUNET_TIME_absolute_get 
().abs_value_us);   
   while (GNUNET_CONTAINER_heap_get_size (connections_heap) > max_connections)
   {
     s = GNUNET_CONTAINER_heap_remove_root (connections_heap);

Modified: gnunet/src/experimentation/gnunet-daemon-experimentation_experiments.c
===================================================================
--- gnunet/src/experimentation/gnunet-daemon-experimentation_experiments.c      
2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/experimentation/gnunet-daemon-experimentation_experiments.c      
2013-08-11 21:21:56 UTC (rev 28501)
@@ -158,7 +158,7 @@
 
        if (0 != strcmp(e->name, find_ctx->name))
                return GNUNET_OK;
-       if (e->version.abs_value != find_ctx->version.abs_value)
+       if (e->version.abs_value_us != find_ctx->version.abs_value_us)
                return GNUNET_OK;
 
        find_ctx->res = e;
@@ -272,8 +272,8 @@
                        e->name,
                        GNUNET_STRINGS_absolute_time_to_string (start),
                        GNUNET_STRINGS_absolute_time_to_string (stop),
-                       (long long unsigned int) frequency.rel_value / 1000,
-                       (long long unsigned int) duration.rel_value / 1000);
+                       (long long unsigned int) frequency.rel_value_us / 
1000000LL,
+                       (long long unsigned int) duration.rel_value_us / 
1000000LL);
        GNUNET_CONTAINER_multihashmap_put (experiments, &e->issuer.hashPubKey, 
e, GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
   GNUNET_STATISTICS_set (GED_stats, "# experiments", 
GNUNET_CONTAINER_multihashmap_size (experiments), GNUNET_NO);
 
@@ -336,7 +336,7 @@
                        GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Experiment 
`%s': Version missing or invalid \n"), name);
                        return;
        }
-       version.abs_value = number;
+       version.abs_value_us = number; // FIXME: what is this supposed to be? 
Version != TIME!???
 
        /* Required capabilities */
        if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_number (exp, name, 
"CAPABILITIES", &number))
@@ -358,14 +358,14 @@
 
 
 
-       if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_number (exp, name, 
"START", (long long unsigned int *) &start.abs_value))
+       if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_number (exp, name, 
"START", (long long unsigned int *) &start.abs_value_us))
                        start = GNUNET_TIME_UNIT_ZERO_ABS;
 
        if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_time (exp, name, 
"FREQUENCY", &frequency))
                        frequency = EXP_DEFAULT_EXP_FREQ;
        if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_time (exp, name, 
"DURATION", &duration))
                        duration = EXP_DEFAULT_EXP_DUR;
-       if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_number (exp, name, 
"STOP", (long long unsigned int *)&stop.abs_value))
+       if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_number (exp, name, 
"STOP", (long long unsigned int *)&stop.abs_value_us))
                        stop = GNUNET_TIME_UNIT_FOREVER_ABS;
 
        GNUNET_EXPERIMENTATION_experiments_add (i, name, issuer, version,

Modified: gnunet/src/experimentation/gnunet-daemon-experimentation_scheduler.c
===================================================================
--- gnunet/src/experimentation/gnunet-daemon-experimentation_scheduler.c        
2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/experimentation/gnunet-daemon-experimentation_scheduler.c        
2013-08-11 21:21:56 UTC (rev 28501)
@@ -133,7 +133,7 @@
                        se->state = REQUESTED;
                        /* Schedule to run */
                        start = 
GNUNET_TIME_absolute_get_remaining(se->e->start);
-                       if (0 == start.rel_value)
+                       if (0 == start.rel_value_us)
                                        se->task = GNUNET_SCHEDULER_add_now 
(&run_experiment_inbound, se);
                        else
                                        se->task = GNUNET_SCHEDULER_add_delayed 
(start, &run_experiment_inbound, se);
@@ -155,7 +155,7 @@
 
                        /* Reschedule */
                        end = 
GNUNET_TIME_absolute_get_remaining(GNUNET_TIME_absolute_add (se->e->stop, 
se->e->frequency));
-                       if (0 == end.rel_value)
+                       if (0 == end.rel_value_us)
                        {
                                se->state = STOPPED;
                                return; /* End of experiment is reached */
@@ -201,7 +201,7 @@
 
                        /* Reschedule */
                        end = 
GNUNET_TIME_absolute_get_remaining(GNUNET_TIME_absolute_add (se->e->stop, 
se->e->frequency));
-                       if (0 == end.rel_value)
+                       if (0 == end.rel_value_us)
                        {
                                se->state = STOPPED;
                                return; /* End of experiment is reached */
@@ -328,7 +328,7 @@
 
        start = GNUNET_TIME_absolute_get_remaining(e->start);
        end = GNUNET_TIME_absolute_get_remaining(e->stop);
-       if (0 == end.rel_value)
+       if (0 == end.rel_value_us)
                        return; /* End of experiment is reached */
 
        /* Add additional checks here if required */
@@ -340,7 +340,7 @@
 
        if (GNUNET_YES == outbound)
        {
-               if (0 == start.rel_value)
+         if (0 == start.rel_value_us)
                                se->task = GNUNET_SCHEDULER_add_now 
(&run_experiment_outbound, se);
                else
                                se->task = GNUNET_SCHEDULER_add_delayed (start, 
&run_experiment_outbound, se);
@@ -348,7 +348,7 @@
        }
        else
        {
-               if (0 == start.rel_value)
+               if (0 == start.rel_value_us)
                                se->task = GNUNET_SCHEDULER_add_now 
(&run_experiment_inbound, se);
                else
                                se->task = GNUNET_SCHEDULER_add_delayed (start, 
&run_experiment_inbound, se);

Modified: gnunet/src/fragmentation/defragmentation.c
===================================================================
--- gnunet/src/fragmentation/defragmentation.c  2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/fragmentation/defragmentation.c  2013-08-11 21:21:56 UTC (rev 
28501)
@@ -354,13 +354,13 @@
   for (i = 0; i < total; i++)
   {
     x[i] = (double) i;
-    y[i] = (double) (first[i].time.abs_value - first[0].time.abs_value);
+    y[i] = (double) (first[i].time.abs_value_us - first[0].time.abs_value_us);
   }
   gsl_fit_mul (x, 1, y, 1, total, &c1, &cov11, &sumsq);
   c1 += sqrt (sumsq);           /* add 1 std dev */
-  ret.rel_value = (uint64_t) c1;
-  if (ret.rel_value == 0)
-    ret = GNUNET_TIME_UNIT_MILLISECONDS;        /* always at least 1 */
+  ret.rel_value_us = (uint64_t) c1;
+  if (0 == ret.rel_value_us)
+    ret = GNUNET_TIME_UNIT_MICROSECONDS;        /* always at least 1 */
   return ret;
 }
 
@@ -381,7 +381,7 @@
   while (NULL != pos)
   {
     if ((old == NULL) ||
-        (old->last_update.abs_value > pos->last_update.abs_value))
+        (old->last_update.abs_value_us > pos->last_update.abs_value_us))
       old = pos;
     pos = pos->next;
   }

Modified: gnunet/src/fragmentation/fragmentation.c
===================================================================
--- gnunet/src/fragmentation/fragmentation.c    2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/fragmentation/fragmentation.c    2013-08-11 21:21:56 UTC (rev 
28501)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet
-     (C) 2009, 2011 Christian Grothoff (and other contributing authors)
+     (C) 2009-2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -180,7 +180,7 @@
     delay = GNUNET_BANDWIDTH_tracker_get_delay (fc->tracker, fsize);
   else
     delay = GNUNET_TIME_UNIT_ZERO;
-  if (delay.rel_value > 0)
+  if (delay.rel_value_us > 0)
   {
     fc->task = GNUNET_SCHEDULER_add_delayed (delay, &transmit_next, fc);
     return;
@@ -207,7 +207,7 @@
     GNUNET_BANDWIDTH_tracker_consume (fc->tracker, fsize);
   GNUNET_STATISTICS_update (fc->stats, _("# fragments transmitted"), 1,
                             GNUNET_NO);
-  if (0 != fc->last_round.abs_value)
+  if (0 != fc->last_round.abs_value_us)
     GNUNET_STATISTICS_update (fc->stats, _("# fragments retransmitted"), 1,
                               GNUNET_NO);
 
@@ -367,8 +367,8 @@
     /* normal ACK, can update running average of delay... */
     fc->wack = GNUNET_NO;
     ndelay = GNUNET_TIME_absolute_get_duration (fc->last_round);
-    fc->ack_delay.rel_value =
-        (ndelay.rel_value / fc->num_transmissions + 3 * 
fc->ack_delay.rel_value) / 4;    
+    fc->ack_delay.rel_value_us =
+        (ndelay.rel_value_us / fc->num_transmissions + 3 * 
fc->ack_delay.rel_value_us) / 4;    
     fc->num_transmissions = 0;
     /* calculate ratio msg sent vs. msg acked */
     ack_cnt = 0;
@@ -392,11 +392,11 @@
     {
       /* some loss, slow down proportionally */
       fprintf (stderr, "Prop loss\n");
-      fc->msg_delay.rel_value = ((fc->msg_delay.rel_value * ack_cnt) / 
snd_cnt);
+      fc->msg_delay.rel_value_us = ((fc->msg_delay.rel_value_us * ack_cnt) / 
snd_cnt);
     }
-    else if (1 < fc->msg_delay.rel_value)
+    else if (100 < fc->msg_delay.rel_value_us)
     {
-      fc->msg_delay.rel_value--; /* try a bit faster */
+      fc->msg_delay.rel_value_us -= 100; /* try a bit faster */
     }
     fc->msg_delay = GNUNET_TIME_relative_min (fc->msg_delay,
                                              GNUNET_TIME_UNIT_SECONDS);

Modified: gnunet/src/fs/fs_api.c
===================================================================
--- gnunet/src/fs/fs_api.c      2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/fs/fs_api.c      2013-08-11 21:21:56 UTC (rev 28501)
@@ -164,7 +164,7 @@
       run_time = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 2);
       end_time = GNUNET_TIME_absolute_add (qe->start_time, run_time);
       rst = GNUNET_TIME_absolute_get_remaining (end_time);
-      if (0 == rst.rel_value)
+      if (0 == rst.rel_value_us)
       {
        num_probes_expired++;
        stop_job (qe);
@@ -181,7 +181,7 @@
                                        qe->blocks * qe->start_times);
       end_time = GNUNET_TIME_absolute_add (qe->start_time, run_time);
       rst = GNUNET_TIME_absolute_get_remaining (end_time);
-      if (0 == rst.rel_value)
+      if (0 == rst.rel_value_us)
       {
        num_downloads_expired++;
        stop_job (qe);
@@ -781,7 +781,7 @@
   struct GNUNET_TIME_Relative dur;
 
   dur = GNUNET_TIME_absolute_get_duration (timestamp);
-  return GNUNET_BIO_write_int64 (wh, dur.rel_value);
+  return GNUNET_BIO_write_int64 (wh, dur.rel_value_us);
 }
 
 
@@ -805,7 +805,7 @@
 {
   struct GNUNET_TIME_Relative dur;
 
-  if (GNUNET_OK != GNUNET_BIO_read_int64 (rh, &dur.rel_value))
+  if (GNUNET_OK != GNUNET_BIO_read_int64 (rh, &dur.rel_value_us))
     return GNUNET_SYSERR;
   *timestamp = GNUNET_TIME_absolute_subtract (GNUNET_TIME_absolute_get (), 
dur);
   return GNUNET_OK;
@@ -871,7 +871,7 @@
       || (GNUNET_OK !=
           GNUNET_BIO_read_string (rh, "fn", &ret->filename, 16 * 1024)) ||
       (GNUNET_OK !=
-       GNUNET_BIO_read_int64 (rh, &ret->bo.expiration_time.abs_value)) ||
+       GNUNET_BIO_read_int64 (rh, &ret->bo.expiration_time.abs_value_us)) ||
       (GNUNET_OK != GNUNET_BIO_read_int32 (rh, &ret->bo.anonymity_level)) ||
       (GNUNET_OK != GNUNET_BIO_read_int32 (rh, &ret->bo.content_priority)) ||
       (GNUNET_OK != GNUNET_BIO_read_int32 (rh, &ret->bo.replication_level)))
@@ -1273,7 +1273,7 @@
       (GNUNET_OK != GNUNET_BIO_write_string (wh, fi->emsg)) ||
       (GNUNET_OK != GNUNET_BIO_write_string (wh, fi->filename)) ||
       (GNUNET_OK !=
-       GNUNET_BIO_write_int64 (wh, fi->bo.expiration_time.abs_value)) ||
+       GNUNET_BIO_write_int64 (wh, fi->bo.expiration_time.abs_value_us)) ||
       (GNUNET_OK != GNUNET_BIO_write_int32 (wh, fi->bo.anonymity_level)) ||
       (GNUNET_OK != GNUNET_BIO_write_int32 (wh, fi->bo.content_priority)) ||
       (GNUNET_OK != GNUNET_BIO_write_int32 (wh, fi->bo.replication_level)))

Modified: gnunet/src/fs/fs_download.c
===================================================================
--- gnunet/src/fs/fs_download.c 2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/fs/fs_download.c 2013-08-11 21:21:56 UTC (rev 28501)
@@ -1082,7 +1082,7 @@
   pi.value.download.specifics.progress.depth = dr->depth;
   pi.value.download.specifics.progress.respect_offered = prc->respect_offered;
   pi.value.download.specifics.progress.num_transmissions = 
prc->num_transmissions;
-  if (prc->last_transmission.abs_value != 
GNUNET_TIME_UNIT_FOREVER_ABS.abs_value)
+  if (prc->last_transmission.abs_value_us != 
GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us)
     pi.value.download.specifics.progress.block_download_duration 
       = GNUNET_TIME_absolute_get_duration (prc->last_transmission);
   else
@@ -1437,7 +1437,7 @@
     dc->in_receive = GNUNET_NO;
     dc->client = NULL;
   }
-  if (0 == dc->reconnect_backoff.rel_value)
+  if (0 == dc->reconnect_backoff.rel_value_us)
     dc->reconnect_backoff = GNUNET_TIME_UNIT_MILLISECONDS;
   else
     dc->reconnect_backoff = GNUNET_TIME_STD_BACKOFF (dc->reconnect_backoff);

Modified: gnunet/src/fs/fs_misc.c
===================================================================
--- gnunet/src/fs/fs_misc.c     2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/fs/fs_misc.c     2013-08-11 21:21:56 UTC (rev 28501)
@@ -202,7 +202,7 @@
   t.tm_yday = 1;
   tp = mktime (&t);
   GNUNET_break (tp != (time_t) - 1);
-  ret.abs_value = tp * 1000LL;  /* seconds to ms */
+  ret.abs_value_us = tp * 1000LL * 1000LL;  /* seconds to microseconds */
   return ret;
 }
 
@@ -219,7 +219,7 @@
   struct tm *t;
   time_t tp;
 
-  tp = at.abs_value / 1000;    /* ms to seconds */
+  tp = at.abs_value_us / 1000LL / 1000LL;    /* microseconds to seconds */
   t = gmtime (&tp);
   if (t == NULL)
     return 0;

Modified: gnunet/src/fs/fs_search.c
===================================================================
--- gnunet/src/fs/fs_search.c   2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/fs/fs_search.c   2013-08-11 21:21:56 UTC (rev 28501)
@@ -342,7 +342,7 @@
     {
       /* should only happen if the cancel task was already
         created on 'DOWNLOAD_INACTIVE' as we were out of time */
-      GNUNET_break (0 == sr->remaining_probe_time.rel_value);
+      GNUNET_break (0 == sr->remaining_probe_time.rel_value_us);
     }
     break;
   case GNUNET_FS_STATUS_DOWNLOAD_INACTIVE:
@@ -354,7 +354,7 @@
     dur = GNUNET_TIME_absolute_get_duration (sr->probe_active_time);
     sr->remaining_probe_time =
         GNUNET_TIME_relative_subtract (sr->remaining_probe_time, dur);
-    if (0 == sr->remaining_probe_time.rel_value)
+    if (0 == sr->remaining_probe_time.rel_value_us)
       sr->probe_cancel_task =
         GNUNET_SCHEDULER_add_now (&probe_failure_handler, sr);
     GNUNET_FS_search_result_sync_ (sr);
@@ -843,7 +843,7 @@
                const void *data,
                 size_t size)
 {
-  if (GNUNET_TIME_absolute_get_duration (expiration).rel_value > 0)
+  if (GNUNET_TIME_absolute_get_duration (expiration).rel_value_us > 0)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Result received has already expired.\n");

Modified: gnunet/src/fs/fs_uri.c
===================================================================
--- gnunet/src/fs/fs_uri.c      2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/fs/fs_uri.c      2013-08-11 21:21:56 UTC (rev 28501)
@@ -638,7 +638,7 @@
   }
   ass.purpose.size = htonl (sizeof (struct LocUriAssembly));
   ass.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_PEER_PLACEMENT);
-  et.abs_value = exptime;
+  et.abs_value_us = exptime * 1000LL * 1000LL;
   ass.exptime = GNUNET_TIME_absolute_hton (et);
   if (GNUNET_OK !=
       GNUNET_CRYPTO_ecc_verify (GNUNET_SIGNATURE_PURPOSE_PEER_PLACEMENT,
@@ -2030,13 +2030,14 @@
   peerSig =
       bin2enc (&uri->data.loc.contentSignature,
                sizeof (struct GNUNET_CRYPTO_EccSignature));
-  GNUNET_asprintf (&ret, "%s%s%s.%s.%llu.%s.%s.%llu", GNUNET_FS_URI_PREFIX,
+  GNUNET_asprintf (&ret, 
+                  "%s%s%s.%s.%llu.%s.%s.%llu", GNUNET_FS_URI_PREFIX,
                    GNUNET_FS_URI_LOC_INFIX, (const char *) &keyhash,
                    (const char *) &queryhash,
                    (unsigned long long) GNUNET_ntohll (uri->data.loc.
                                                        fi.file_length), peerId,
                    peerSig,
-                   (unsigned long long) 
uri->data.loc.expirationTime.abs_value);
+                   (unsigned long long) 
uri->data.loc.expirationTime.abs_value_us / 1000LL / 1000LL);
   GNUNET_free (peerSig);
   GNUNET_free (peerId);
   return ret;

Modified: gnunet/src/fs/gnunet-daemon-fsprofiler.c
===================================================================
--- gnunet/src/fs/gnunet-daemon-fsprofiler.c    2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/fs/gnunet-daemon-fsprofiler.c    2013-08-11 21:21:56 UTC (rev 
28501)
@@ -189,7 +189,7 @@
     p = GNUNET_malloc (sizeof (struct Pattern));
     p->x = x;
     p->y = y;
-    p->delay.rel_value = (uint64_t) t;
+    p->delay.rel_value_us = (uint64_t) t;
     GNUNET_CONTAINER_DLL_insert (*head, *tail, p);
     pattern = strstr (pattern, ")");
     GNUNET_assert (NULL != pattern);
@@ -397,7 +397,7 @@
     p = info->value.publish.cctx;
     GNUNET_STATISTICS_update (stats_handle,
                              "# publishing time (ms)", 
-                             (long long) GNUNET_TIME_absolute_get_duration 
(p->start_time).rel_value, 
+                             (long long) GNUNET_TIME_absolute_get_duration 
(p->start_time).rel_value_us / 1000LL, 
                              GNUNET_NO);
     p->task = GNUNET_SCHEDULER_add_now (&publish_stop_task, p);
     return p;
@@ -425,8 +425,9 @@
     p = info->value.download.cctx;
     GNUNET_STATISTICS_update (stats_handle,
                              "# download time (ms)", 
-                             (long long) GNUNET_TIME_absolute_get_duration 
(p->start_time).rel_value, 
-                             GNUNET_NO);    p->task = GNUNET_SCHEDULER_add_now 
(&download_stop_task, p);
+                             (long long) GNUNET_TIME_absolute_get_duration 
(p->start_time).rel_value_us / 1000LL, 
+                             GNUNET_NO); 
+    p->task = GNUNET_SCHEDULER_add_now (&download_stop_task, p);
     return p;
   case GNUNET_FS_STATUS_DOWNLOAD_STOPPED:
     p = info->value.download.cctx;
@@ -450,7 +451,7 @@
       return NULL; /* not what we want */
     GNUNET_STATISTICS_update (stats_handle,
                              "# search time (ms)", 
-                             (long long) GNUNET_TIME_absolute_get_duration 
(p->start_time).rel_value, 
+                             (long long) GNUNET_TIME_absolute_get_duration 
(p->start_time).rel_value_us / 1000LL, 
                              GNUNET_NO);
     p->start_time = GNUNET_TIME_absolute_get ();
     p->ctx = GNUNET_FS_download_start (fs_handle, uri,

Modified: gnunet/src/fs/gnunet-download.c
===================================================================
--- gnunet/src/fs/gnunet-download.c     2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/fs/gnunet-download.c     2013-08-11 21:21:56 UTC (rev 28501)
@@ -142,8 +142,8 @@
     {
       s = GNUNET_strdup (GNUNET_STRINGS_relative_time_to_string 
(info->value.download.eta,
                                                                 GNUNET_YES));
-      if 
(info->value.download.specifics.progress.block_download_duration.rel_value 
-          == GNUNET_TIME_UNIT_FOREVER_REL.rel_value)
+      if 
(info->value.download.specifics.progress.block_download_duration.rel_value_us 
+          == GNUNET_TIME_UNIT_FOREVER_REL.rel_value_us)
         s2 = _("<unknown time>");
       else
         s2 = GNUNET_STRINGS_relative_time_to_string (
@@ -152,7 +152,7 @@
       t = GNUNET_STRINGS_byte_size_fancy (info->value.download.completed *
                                           1000LL /
                                           (info->value.download.
-                                           duration.rel_value + 1));
+                                           duration.rel_value_us + 1));
       FPRINTF (stdout,
                _("Downloading `%s' at %llu/%llu (%s remaining, %s/s). Block 
took %s to download\n"),
                info->value.download.filename,
@@ -183,7 +183,7 @@
   case GNUNET_FS_STATUS_DOWNLOAD_COMPLETED:
     s = GNUNET_STRINGS_byte_size_fancy (info->value.download.completed * 1000 /
                                         (info->value.download.
-                                         duration.rel_value + 1));
+                                         duration.rel_value_us + 1));
 #if !WINDOWS
     if (0 != isatty (1))
       fprintf (stdout, "\n");

Modified: gnunet/src/fs/gnunet-fs-profiler.c
===================================================================
--- gnunet/src/fs/gnunet-fs-profiler.c  2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/fs/gnunet-fs-profiler.c  2013-08-11 21:21:56 UTC (rev 28501)
@@ -145,7 +145,7 @@
   // FIXME: enable clients to signal 'completion' before timeout;
   // in that case, run the 'terminate_task' "immediately"
 
-  if (0 != timeout.rel_value)
+  if (0 != timeout.rel_value_us)
     terminate_taskid = GNUNET_SCHEDULER_add_delayed (timeout,
                                                     &terminate_task, NULL);
   else

Modified: gnunet/src/fs/gnunet-search.c
===================================================================
--- gnunet/src/fs/gnunet-search.c       2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/fs/gnunet-search.c       2013-08-11 21:21:56 UTC (rev 28501)
@@ -259,7 +259,7 @@
     ret = 1;
     return;
   }
-  if (0 != timeout.rel_value)
+  if (0 != timeout.rel_value_us)
     GNUNET_SCHEDULER_add_delayed (timeout, &shutdown_task, NULL);
   else
     GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task,

Modified: gnunet/src/fs/gnunet-service-fs.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs.c   2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/fs/gnunet-service-fs.c   2013-08-11 21:21:56 UTC (rev 28501)
@@ -202,7 +202,7 @@
   struct GNUNET_TIME_Relative delay;
 
   delay = GNUNET_TIME_absolute_get_duration (start);
-  GNUNET_LOAD_update (datastore_get_load, delay.rel_value);
+  GNUNET_LOAD_update (datastore_get_load, delay.rel_value_us);
 }
 
 
@@ -260,16 +260,16 @@
   {
     if (GNUNET_ATS_QUALITY_NET_DELAY != ntohl (ats[i].type))
       continue;
-    latency.rel_value = ntohl (ats[i].value);
+    latency.rel_value_us = ntohl (ats[i].value);
     GSF_update_peer_latency_ (&address->peer,
                              latency);
-    GSF_avg_latency.rel_value =
-      (GSF_avg_latency.rel_value * 31 +
+    GSF_avg_latency.rel_value_us =
+      (GSF_avg_latency.rel_value_us * 31 +
        GNUNET_MIN (5000, ntohl (ats[i].value))) / 32;
     GNUNET_STATISTICS_set (GSF_stats,
                           gettext_noop
                           ("# running average P2P latency (ms)"),
-                          GSF_avg_latency.rel_value, GNUNET_NO);
+                          GSF_avg_latency.rel_value_us / 1000LL, GNUNET_NO);
     break;    
   }
 }

Modified: gnunet/src/fs/gnunet-service-fs_cp.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_cp.c        2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/fs/gnunet-service-fs_cp.c        2013-08-11 21:21:56 UTC (rev 
28501)
@@ -488,7 +488,7 @@
   }
   GNUNET_LOAD_update (cp->ppd.transmission_delay,
                       GNUNET_TIME_absolute_get_duration
-                      (pth->transmission_request_start_time).rel_value);
+                      (pth->transmission_request_start_time).rel_value_us);
   ret = pth->gmc (pth->gmc_cls, size, buf);
   if (NULL != (pos = cp->pth_head))
   {
@@ -621,7 +621,7 @@
 
   cp->mig_revive_task = GNUNET_SCHEDULER_NO_TASK;
   bt = GNUNET_TIME_absolute_get_remaining (cp->ppd.migration_blocked_until);
-  if (0 != bt.rel_value)
+  if (0 != bt.rel_value_us)
   {
     /* still time left... */
     cp->mig_revive_task =
@@ -833,12 +833,12 @@
       GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS,
                                      GNUNET_CRYPTO_random_u32
                                      (GNUNET_CRYPTO_QUALITY_WEAK,
-                                      2 * GSF_avg_latency.rel_value + 1));
+                                      2 * GSF_avg_latency.rel_value_us + 1));
 #if INSANE_STATISTICS
   GNUNET_STATISTICS_update (GSF_stats,
                             gettext_noop
                             ("# artificial delays introduced (ms)"),
-                            ret.rel_value, GNUNET_NO);
+                            ret.rel_value_us / 1000LL, GNUNET_NO);
 #endif
   return ret;
 }
@@ -1216,7 +1216,7 @@
   spid = 0;
   if ((GNUNET_LOAD_get_load (cp->ppd.transmission_delay) > 3 * (1 + priority))
       || (GNUNET_LOAD_get_average (cp->ppd.transmission_delay) >
-          GNUNET_CONSTANTS_MAX_CORK_DELAY.rel_value * 2 +
+          GNUNET_CONSTANTS_MAX_CORK_DELAY.rel_value_us * 2 +
           GNUNET_LOAD_get_average (GSF_rt_entry_lifetime)))
   {
     /* don't have BW to send to peer, or would likely take longer than we have 
for it,
@@ -1253,7 +1253,7 @@
     prd = GSF_pending_request_get_data_ (pr);
     if (prd->type == type) 
     {
-      if (prd->ttl.abs_value >= GNUNET_TIME_absolute_get ().abs_value + ttl)
+      if (prd->ttl.abs_value_us >= GNUNET_TIME_absolute_get ().abs_value_us + 
ttl * 1000LL)
       {
         /* existing request has higher TTL, drop new one! */
         prd->priority += priority;
@@ -1425,9 +1425,9 @@
   struct GNUNET_TIME_Relative delay;
 
   delay = GNUNET_TIME_absolute_get_duration (request_time);
-  cp->ppd.avg_reply_delay.rel_value =
-      (cp->ppd.avg_reply_delay.rel_value * (RUNAVG_DELAY_N - 1) +
-       delay.rel_value) / RUNAVG_DELAY_N;
+  cp->ppd.avg_reply_delay.rel_value_us =
+      (cp->ppd.avg_reply_delay.rel_value_us * (RUNAVG_DELAY_N - 1) +
+       delay.rel_value_us) / RUNAVG_DELAY_N;
   cp->ppd.avg_priority =
       (cp->ppd.avg_priority * (RUNAVG_DELAY_N - 1) +
        request_priority) / RUNAVG_DELAY_N;
@@ -1678,7 +1678,7 @@
 GSF_block_peer_migration_ (struct GSF_ConnectedPeer *cp,
                            struct GNUNET_TIME_Absolute block_time)
 {
-  if (cp->last_migration_block.abs_value > block_time.abs_value)
+  if (cp->last_migration_block.abs_value_us > block_time.abs_value_us)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Migration already blocked for another %s\n",
@@ -1686,8 +1686,9 @@
                                                        
(cp->last_migration_block), GNUNET_YES));
     return;                     /* already blocked */
   }
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Asking to stop migration for %llu 
ms\n",
-              (unsigned long long) GNUNET_TIME_absolute_get_remaining 
(block_time).rel_value);
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Asking to stop migration for %s\n",
+              GNUNET_STRINGS_relative_time_to_string 
(GNUNET_TIME_absolute_get_remaining (block_time),
+                                                     GNUNET_YES));
   cp->last_migration_block = block_time;
   if (NULL != cp->migration_pth)
     GSF_peer_transmit_cancel_ (cp->migration_pth);

Modified: gnunet/src/fs/gnunet-service-fs_pe.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_pe.c        2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/fs/gnunet-service-fs_pe.c        2013-08-11 21:21:56 UTC (rev 
28501)
@@ -283,11 +283,11 @@
     delay =
         GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS,
                                        8 + (1LL << 24));
-  delay.rel_value =
-      GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK,
-                                delay.rel_value + 1);
+  delay.rel_value_us =
+    GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK,
+                             delay.rel_value_us + 1);
   /* Add 0.01 to avg_delay to avoid division-by-zero later */
-  avg_delay = (((avg_delay * (N - 1.0)) + delay.rel_value) / N) + 0.01;
+  avg_delay = (((avg_delay * (N - 1.0)) + delay.rel_value_us) / N) + 0.01;
 
   /*
    * For the priority, we need to consider a few basic rules:
@@ -312,27 +312,27 @@
    */
   rp->priority =
       round ((GSF_current_priorities +
-              1.0) * atan (delay.rel_value / avg_delay)) / M_PI_4;
+              1.0) * atan (delay.rel_value_us / avg_delay)) / M_PI_4;
   /* Note: usage of 'round' and 'atan' requires -lm */
 
   if (rp->transmission_counter != 0)
-    delay.rel_value += TTL_DECREMENT;
+    delay.rel_value_us += TTL_DECREMENT * 1000;
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "Considering (re)transmission number %u in %llu ms\n",
+              "Considering (re)transmission number %u in %s\n",
               (unsigned int) rp->transmission_counter,
-              (unsigned long long) delay.rel_value);
+              GNUNET_STRINGS_relative_time_to_string (delay,
+                                                     GNUNET_YES));
   rp->earliest_transmission = GNUNET_TIME_relative_to_absolute (delay);
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Earliest (re)transmission for `%s' in %us\n",
               GNUNET_h2s (&prd->query), rp->transmission_counter);
   GNUNET_assert (rp->hn == NULL);
-  if (GNUNET_TIME_absolute_get_remaining (rp->earliest_transmission).rel_value
-      == 0)
+  if (0 == GNUNET_TIME_absolute_get_remaining 
(rp->earliest_transmission).rel_value_us)
     rp->hn = GNUNET_CONTAINER_heap_insert (pp->priority_heap, rp, 
rp->priority);
   else
     rp->hn =
         GNUNET_CONTAINER_heap_insert (pp->delay_heap, rp,
-                                      rp->earliest_transmission.abs_value);
+                                      rp->earliest_transmission.abs_value_us);
   GNUNET_assert (GNUNET_YES ==
                  GNUNET_CONTAINER_multihashmap_contains_value (pp->plan_map,
                                                                get_rp_key (rp),
@@ -363,8 +363,8 @@
   bi = bi->next_PE; 
   while (NULL != bi)
   {
-    if (GSF_pending_request_get_data_ (bi->pr)->ttl.abs_value >
-        GSF_pending_request_get_data_ (ret)->ttl.abs_value)
+    if (GSF_pending_request_get_data_ (bi->pr)->ttl.abs_value_us >
+        GSF_pending_request_get_data_ (ret)->ttl.abs_value_us)
       ret = bi->pr;
     bi = bi->next_PE;
   }
@@ -459,8 +459,8 @@
   }
   /* move ready requests to priority queue */
   while ((NULL != (rp = GNUNET_CONTAINER_heap_peek (pp->delay_heap))) &&
-         (GNUNET_TIME_absolute_get_remaining
-          (rp->earliest_transmission).rel_value == 0))
+         (0 == GNUNET_TIME_absolute_get_remaining
+          (rp->earliest_transmission).rel_value_us))
   {
     GNUNET_assert (rp == GNUNET_CONTAINER_heap_remove_root (pp->delay_heap));
     rp->hn = GNUNET_CONTAINER_heap_insert (pp->priority_heap, rp, 
rp->priority);
@@ -477,10 +477,12 @@
     }
     delay = GNUNET_TIME_absolute_get_remaining (rp->earliest_transmission);
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                "Sleeping for %llu ms before retrying requests on plan %p.\n",
-                (unsigned long long) delay.rel_value, pp);
-    GNUNET_STATISTICS_set (GSF_stats, gettext_noop ("# delay heap timeout"),
-                           delay.rel_value, GNUNET_NO);
+                "Sleeping for %s before retrying requests on plan %p.\n",
+                GNUNET_STRINGS_relative_time_to_string (delay,
+                                                       GNUNET_YES),
+               pp);
+    GNUNET_STATISTICS_set (GSF_stats, gettext_noop ("# delay heap timeout 
(ms)"),
+                           delay.rel_value_us / 1000LL, GNUNET_NO);
 
     pp->task =
         GNUNET_SCHEDULER_add_delayed (delay, &schedule_peer_transmission, pp);
@@ -551,8 +553,8 @@
                             GNUNET_NO);
 #endif
   latest = get_latest (rp);
-  if (GSF_pending_request_get_data_ (latest)->ttl.abs_value <
-      prd->ttl.abs_value)
+  if (GSF_pending_request_get_data_ (latest)->ttl.abs_value_us <
+      prd->ttl.abs_value_us)
   {
 #if INSANE_STATISTICS
     GNUNET_STATISTICS_update (GSF_stats, gettext_noop ("# requests refreshed"),
@@ -721,7 +723,7 @@
   {
     if (bi->rp->pp->cp == sender)
     {
-      if (0 == bi->rp->last_transmission.abs_value)
+      if (0 == bi->rp->last_transmission.abs_value_us)
        *result = GNUNET_TIME_UNIT_FOREVER_ABS;
       else
        *result = bi->rp->last_transmission;

Modified: gnunet/src/fs/gnunet-service-fs_pr.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_pr.c        2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/fs/gnunet-service-fs_pr.c        2013-08-11 21:21:56 UTC (rev 
28501)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2009, 2010, 2011, 2012 Christian Grothoff (and other contributing 
authors)
+     (C) 2009-2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -373,7 +373,7 @@
   {
     pr->hnode =
         GNUNET_CONTAINER_heap_insert (requests_by_expiration_heap, pr,
-                                      pr->public_data.ttl.abs_value);
+                                      pr->public_data.ttl.abs_value_us);
     /* make sure we don't track too many requests */
     while (GNUNET_CONTAINER_heap_get_size (requests_by_expiration_heap) >
            max_pending_requests)
@@ -555,8 +555,8 @@
   pr->public_data.respect_offered += prio;
   gm->priority = htonl (prio);
   now = GNUNET_TIME_absolute_get ();
-  ttl = (int64_t) (pr->public_data.ttl.abs_value - now.abs_value);
-  gm->ttl = htonl (ttl / 1000);
+  ttl = (int64_t) (pr->public_data.ttl.abs_value_us - now.abs_value_us);
+  gm->ttl = htonl (ttl / 1000LL / 1000LL);
   gm->filter_mutator = htonl (pr->mingle);
   gm->hash_bitmap = htonl (bm);
   gm->query = pr->public_data.query;
@@ -825,12 +825,12 @@
     update_request_performance_data (prq, pr);
     GNUNET_LOAD_update (GSF_rt_entry_lifetime,
                         GNUNET_TIME_absolute_get_duration (pr->
-                                                           
public_data.start_time).rel_value);
+                                                           
public_data.start_time).rel_value_us);
     if (GNUNET_YES !=
        GSF_request_plan_reference_get_last_transmission_ 
(pr->public_data.pr_head, 
                                                           prq->sender, 
                                                           &last_transmission))
-      last_transmission.abs_value = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value;
+      last_transmission.abs_value_us = 
GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us;
     /* pass on to other peers / local clients */
     pr->rh (pr->rh_cls, prq->eval, pr, prq->anonymity_level, prq->expiration,
             last_transmission, prq->type, prq->data, prq->size);
@@ -891,7 +891,7 @@
   if (! GSF_request_plan_reference_get_last_transmission_ 
(pr->public_data.pr_head,
                                                           prq->sender, 
                                                           &last_transmission))
-    last_transmission.abs_value = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value;
+    last_transmission.abs_value_us = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us;
   pr->rh (pr->rh_cls, prq->eval, pr, 
          prq->anonymity_level, prq->expiration,
           last_transmission, prq->type, prq->data, prq->size);
@@ -947,13 +947,13 @@
     if (GNUNET_SYSERR != success)
     {
       GNUNET_LOAD_update (datastore_put_load, 
-                         GNUNET_TIME_absolute_get_duration 
(pmc->start).rel_value);
+                         GNUNET_TIME_absolute_get_duration 
(pmc->start).rel_value_us);
     }
     else
     {
       /* on queue failure / timeout, increase the put load dramatically */
       GNUNET_LOAD_update (datastore_put_load, 
-                         GNUNET_TIME_UNIT_MINUTES.rel_value);
+                         GNUNET_TIME_UNIT_MINUTES.rel_value_us);
     }
   }
   cp = GSF_peer_get_ (&pmc->origin);
@@ -962,7 +962,7 @@
     if (NULL != cp)
     {
       ppd = GSF_get_peer_performance_data_ (cp);
-      ppd->migration_delay.rel_value /= 2;
+      ppd->migration_delay.rel_value_us /= 2;
     }
     GNUNET_free (pmc);
     return;
@@ -972,7 +972,7 @@
        (NULL != cp) )
   {
     ppd = GSF_get_peer_performance_data_ (cp);
-    if (min_expiration.abs_value > 0)
+    if (min_expiration.abs_value_us > 0)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 
                  "Asking to stop migration for %s because datastore is full\n",
@@ -985,8 +985,8 @@
                                                       ppd->migration_delay);
       ppd->migration_delay = GNUNET_TIME_relative_min (GNUNET_TIME_UNIT_HOURS,
                                                       ppd->migration_delay);
-      mig_pause.rel_value = GNUNET_CRYPTO_random_u64 
(GNUNET_CRYPTO_QUALITY_WEAK,
-                                                     
ppd->migration_delay.rel_value);
+      mig_pause.rel_value_us = GNUNET_CRYPTO_random_u64 
(GNUNET_CRYPTO_QUALITY_WEAK,
+                                                        
ppd->migration_delay.rel_value_us);
       ppd->migration_delay = GNUNET_TIME_relative_multiply 
(ppd->migration_delay, 2);
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 
                  "Replicated content already exists locally, asking to stop 
migration for %s\n",
@@ -1711,8 +1711,9 @@
                                        (GNUNET_CRYPTO_QUALITY_WEAK,
                                         (unsigned int) (60000 * putl * putl)));
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 
-               "Asking to stop migration for %llu ms because of load %f and 
events %d/%d\n",
-               (unsigned long long) block_time.rel_value,
+               "Asking to stop migration for %s because of load %f and events 
%d/%d\n",
+               GNUNET_STRINGS_relative_time_to_string (block_time,
+                                                       GNUNET_YES),
                putl,
                active_to_migration,
                (GNUNET_NO == prq.request_found));

Modified: gnunet/src/fs/gnunet-service-fs_push.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_push.c      2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/fs/gnunet-service-fs_push.c      2013-08-11 21:21:56 UTC (rev 
28501)
@@ -482,8 +482,8 @@
     consider_gathering ();
     return;
   }
-  if (GNUNET_TIME_absolute_get_remaining (expiration).rel_value <
-      MIN_MIGRATION_CONTENT_LIFETIME.rel_value)
+  if (GNUNET_TIME_absolute_get_remaining (expiration).rel_value_us <
+      MIN_MIGRATION_CONTENT_LIFETIME.rel_value_us)
   {
     /* content will expire soon, don't bother */
     consider_gathering ();

Modified: gnunet/src/fs/perf_gnunet_service_fs_p2p.c
===================================================================
--- gnunet/src/fs/perf_gnunet_service_fs_p2p.c  2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/fs/perf_gnunet_service_fs_p2p.c  2013-08-11 21:21:56 UTC (rev 
28501)
@@ -254,11 +254,11 @@
   }
 
   del = GNUNET_TIME_absolute_get_duration (start_time);
-  if (del.rel_value == 0)
-    del.rel_value = 1;
+  if (del.rel_value_us == 0)
+    del.rel_value_us = 1;
   fancy =
     GNUNET_STRINGS_byte_size_fancy (((unsigned long long) FILESIZE) *
-                                   1000LL / del.rel_value);
+                                   1000000LL / del.rel_value_us);
   FPRINTF (stdout, "Download speed was %s/s\n", fancy);
   GNUNET_free (fancy);
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Finished download, shutting down\n",

Modified: gnunet/src/fs/perf_gnunet_service_fs_p2p_respect.c
===================================================================
--- gnunet/src/fs/perf_gnunet_service_fs_p2p_respect.c  2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/fs/perf_gnunet_service_fs_p2p_respect.c  2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -297,11 +297,11 @@
     return;
   }
   del = GNUNET_TIME_absolute_get_duration (start_time);
-  if (del.rel_value == 0)
-    del.rel_value = 1;
+  if (del.rel_value_us == 0)
+    del.rel_value_us = 1;
   fancy =
     GNUNET_STRINGS_byte_size_fancy (((unsigned long long) FILESIZE) *
-                                   1000LL / del.rel_value);
+                                   1000000LL / del.rel_value_us);
   FPRINTF (stderr, "Download speed of type `%s' was %s/s\n", type, fancy);
   GNUNET_free (fancy);
   if (NUM_DAEMONS != ++download_counter)

Modified: gnunet/src/fs/test_fs_download.c
===================================================================
--- gnunet/src/fs/test_fs_download.c    2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/fs/test_fs_download.c    2013-08-11 21:21:56 UTC (rev 28501)
@@ -142,18 +142,18 @@
   case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
     fprintf (stdout,
             "Publishing complete, %llu kb/s.\n",
-            (unsigned long long) (FILESIZE * 1000LL /
+            (unsigned long long) (FILESIZE * 1000000LL /
                                   (1 +
                                    GNUNET_TIME_absolute_get_duration
-                                   (start).rel_value) / 1024LL));
+                                   (start).rel_value_us) / 1024LL));
     GAUGER ("FS", 
            (GNUNET_YES == indexed) 
            ? "Publishing speed (indexing)"
             : "Publishing speed (insertion)",
-           (unsigned long long) (FILESIZE * 1000LL /
+           (unsigned long long) (FILESIZE * 1000000LL /
                                  (1 +
                                   GNUNET_TIME_absolute_get_duration
-                                  (start).rel_value) / 1024LL), "kb/s");
+                                  (start).rel_value_us) / 1024LL), "kb/s");
     fn = GNUNET_DISK_mktemp ("gnunet-download-test-dst");
     start = GNUNET_TIME_absolute_get ();
     download =
@@ -168,18 +168,18 @@
   case GNUNET_FS_STATUS_DOWNLOAD_COMPLETED:
     fprintf (stdout,
             "Download complete,  %llu kb/s.\n",
-            (unsigned long long) (FILESIZE * 1000LL /
+            (unsigned long long) (FILESIZE * 1000000LL /
                                   (1 +
                                    GNUNET_TIME_absolute_get_duration
-                                   (start).rel_value) / 1024LL));
+                                   (start).rel_value_us) / 1024LL));
     GAUGER ("FS",
            (GNUNET_YES == indexed) 
            ? "Local download speed (indexed)"  
            : "Local download speed (inserted)",
-            (unsigned long long) (FILESIZE * 1000LL /
+            (unsigned long long) (FILESIZE * 1000000LL /
                                   (1 +
                                    GNUNET_TIME_absolute_get_duration
-                                   (start).rel_value) / 1024LL), "kb/s");
+                                   (start).rel_value_us) / 1024LL), "kb/s");
     GNUNET_SCHEDULER_add_now (&abort_download_task, NULL);
     break;
   case GNUNET_FS_STATUS_DOWNLOAD_PROGRESS:

Modified: gnunet/src/fs/test_fs_download_persistence.c
===================================================================
--- gnunet/src/fs/test_fs_download_persistence.c        2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/fs/test_fs_download_persistence.c        2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -164,10 +164,10 @@
     break;
   case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
     printf ("Publishing complete, %llu kbps.\n",
-            (unsigned long long) (FILESIZE * 1000LL /
+            (unsigned long long) (FILESIZE * 1000000LL /
                                   (1 +
                                    GNUNET_TIME_absolute_get_duration
-                                   (start).rel_value) / 1024LL));
+                                   (start).rel_value_us) / 1024LL));
     fn = GNUNET_DISK_mktemp ("gnunet-download-test-dst");
     start = GNUNET_TIME_absolute_get ();
     GNUNET_assert (download == NULL);
@@ -179,10 +179,10 @@
   case GNUNET_FS_STATUS_DOWNLOAD_COMPLETED:
     consider_restart (event->status);
     printf ("Download complete,  %llu kbps.\n",
-            (unsigned long long) (FILESIZE * 1000LL /
+            (unsigned long long) (FILESIZE * 1000000LL /
                                   (1 +
                                    GNUNET_TIME_absolute_get_duration
-                                   (start).rel_value) / 1024LL));
+                                   (start).rel_value_us) / 1024LL));
     GNUNET_SCHEDULER_add_now (&abort_download_task, NULL);
     break;
   case GNUNET_FS_STATUS_DOWNLOAD_PROGRESS:

Modified: gnunet/src/fs/test_fs_list_indexed.c
===================================================================
--- gnunet/src/fs/test_fs_list_indexed.c        2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/fs/test_fs_list_indexed.c        2013-08-11 21:21:56 UTC (rev 
28501)
@@ -95,10 +95,10 @@
   case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
     ret = event->value.publish.cctx;
     printf ("Publish complete,  %llu kbps.\n",
-            (unsigned long long) (FILESIZE * 1000 /
+            (unsigned long long) (FILESIZE * 1000000LL /
                                   (1 +
                                    GNUNET_TIME_absolute_get_duration
-                                   (start).rel_value) / 1024));
+                                   (start).rel_value_us) / 1024));
     if (0 == strcmp ("list_indexed-context-dir", event->value.publish.cctx))
       GNUNET_SCHEDULER_add_continuation (&list_indexed_task, NULL,
                                          GNUNET_SCHEDULER_REASON_PREREQ_DONE);

Modified: gnunet/src/fs/test_fs_publish.c
===================================================================
--- gnunet/src/fs/test_fs_publish.c     2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/fs/test_fs_publish.c     2013-08-11 21:21:56 UTC (rev 28501)
@@ -82,10 +82,10 @@
   case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
     ret = event->value.publish.cctx;
     printf ("Publish complete,  %llu kbps.\n",
-            (unsigned long long) (FILESIZE * 1000 /
+            (unsigned long long) (FILESIZE * 1000000LL /
                                   (1 +
                                    GNUNET_TIME_absolute_get_duration
-                                   (start).rel_value) / 1024));
+                                   (start).rel_value_us) / 1024));
     if (0 == strcmp ("publish-context-dir", event->value.publish.cctx))
       GNUNET_SCHEDULER_add_continuation (&abort_publish_task, NULL,
                                          GNUNET_SCHEDULER_REASON_PREREQ_DONE);

Modified: gnunet/src/fs/test_fs_publish_persistence.c
===================================================================
--- gnunet/src/fs/test_fs_publish_persistence.c 2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/fs/test_fs_publish_persistence.c 2013-08-11 21:21:56 UTC (rev 
28501)
@@ -134,10 +134,10 @@
     consider_restart (event->status);
     ret = event->value.publish.cctx;
     printf ("Publish complete,  %llu kbps.\n",
-            (unsigned long long) (FILESIZE * 1000LL /
+            (unsigned long long) (FILESIZE * 1000000LL /
                                   (1 +
                                    GNUNET_TIME_absolute_get_duration
-                                   (start).rel_value) / 1024));
+                                   (start).rel_value_us) / 1024));
     if (0 == strcmp ("publish-context-dir", event->value.publish.cctx))
       GNUNET_SCHEDULER_add_now (&abort_publish_task, NULL);
     break;

Modified: gnunet/src/fs/test_fs_unindex.c
===================================================================
--- gnunet/src/fs/test_fs_unindex.c     2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/fs/test_fs_unindex.c     2013-08-11 21:21:56 UTC (rev 28501)
@@ -92,20 +92,20 @@
     break;
   case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
     printf ("Publishing complete, %llu kbps.\n",
-            (unsigned long long) (FILESIZE * 1000 /
+            (unsigned long long) (FILESIZE * 1000000LL /
                                   (1 +
                                    GNUNET_TIME_absolute_get_duration
-                                   (start).rel_value) / 1024));
+                                   (start).rel_value_us) / 1024));
     start = GNUNET_TIME_absolute_get ();
     unindex = GNUNET_FS_unindex_start (fs, fn, "unindex");
     GNUNET_assert (unindex != NULL);
     break;
   case GNUNET_FS_STATUS_UNINDEX_COMPLETED:
     printf ("Unindex complete,  %llu kbps.\n",
-            (unsigned long long) (FILESIZE * 1000 /
+            (unsigned long long) (FILESIZE * 1000000LL /
                                   (1 +
                                    GNUNET_TIME_absolute_get_duration
-                                   (start).rel_value) / 1024));
+                                   (start).rel_value_us) / 1024));
     GNUNET_SCHEDULER_add_continuation (&abort_unindex_task, NULL,
                                        GNUNET_SCHEDULER_REASON_PREREQ_DONE);
     break;

Modified: gnunet/src/fs/test_fs_unindex_persistence.c
===================================================================
--- gnunet/src/fs/test_fs_unindex_persistence.c 2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/fs/test_fs_unindex_persistence.c 2013-08-11 21:21:56 UTC (rev 
28501)
@@ -134,20 +134,20 @@
     break;
   case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
     printf ("Publishing complete, %llu kbps.\n",
-            (unsigned long long) (FILESIZE * 1000 /
+            (unsigned long long) (FILESIZE * 1000000LL /
                                   (1 +
                                    GNUNET_TIME_absolute_get_duration
-                                   (start).rel_value) / 1024));
+                                   (start).rel_value_us) / 1024));
     start = GNUNET_TIME_absolute_get ();
     unindex = GNUNET_FS_unindex_start (fs, fn, "unindex");
     GNUNET_assert (unindex != NULL);
     break;
   case GNUNET_FS_STATUS_UNINDEX_COMPLETED:
     printf ("Unindex complete,  %llu kbps.\n",
-            (unsigned long long) (FILESIZE * 1000 /
+            (unsigned long long) (FILESIZE * 1000000LL /
                                   (1 +
                                    GNUNET_TIME_absolute_get_duration
-                                   (start).rel_value) / 1024));
+                                   (start).rel_value_us) / 1024));
     GNUNET_SCHEDULER_add_continuation (&abort_unindex_task, NULL,
                                        GNUNET_SCHEDULER_REASON_PREREQ_DONE);
     break;

Modified: gnunet/src/fs/test_gnunet_service_fs_migration.c
===================================================================
--- gnunet/src/fs/test_gnunet_service_fs_migration.c    2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/fs/test_gnunet_service_fs_migration.c    2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -73,11 +73,11 @@
   if (0 == (tc->reason & GNUNET_SCHEDULER_REASON_TIMEOUT))
   {
     del = GNUNET_TIME_absolute_get_duration (start_time);
-    if (del.rel_value == 0)
-      del.rel_value = 1;
+    if (del.rel_value_us == 0)
+      del.rel_value_us = 1;
     fancy =
         GNUNET_STRINGS_byte_size_fancy (((unsigned long long) FILESIZE) *
-                                        1000LL / del.rel_value);
+                                        1000000LL / del.rel_value_us);
     FPRINTF (stdout, "Download speed was %s/s\n", fancy);
     GNUNET_free (fancy);
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Finished download, shutting down\n",

Modified: gnunet/src/fs/test_gnunet_service_fs_p2p.c
===================================================================
--- gnunet/src/fs/test_gnunet_service_fs_p2p.c  2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/fs/test_gnunet_service_fs_p2p.c  2013-08-11 21:21:56 UTC (rev 
28501)
@@ -64,11 +64,11 @@
   if (0 == (tc->reason & GNUNET_SCHEDULER_REASON_TIMEOUT))
   {
     del = GNUNET_TIME_absolute_get_duration (start_time);
-    if (del.rel_value == 0)
-      del.rel_value = 1;
+    if (del.rel_value_us == 0)
+      del.rel_value_us = 1;
     fancy =
-        GNUNET_STRINGS_byte_size_fancy (((unsigned long long) FILESIZE) *
-                                        1000LL / del.rel_value);
+      GNUNET_STRINGS_byte_size_fancy (((unsigned long long) FILESIZE) *
+                                     1000000LL / del.rel_value_us);
     FPRINTF (stdout, "Download speed was %s/s\n", fancy);
     GNUNET_free (fancy);
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Finished download, shutting down\n",

Modified: gnunet/src/gns/gnunet-dns2gns.c
===================================================================
--- gnunet/src/gns/gnunet-dns2gns.c     2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/gns/gnunet-dns2gns.c     2013-08-11 21:21:56 UTC (rev 28501)
@@ -282,7 +282,7 @@
   //packet->flags.opcode = GNUNET_DNSPARSER_OPCODE_STATUS; // ???
   for (i=0;i<rd_count;i++)
     {
-      rec.expiration_time.abs_value = rd[i].expiration_time;
+      rec.expiration_time.abs_value_us = rd[i].expiration_time;
       switch (rd[i].record_type)
        {
        case GNUNET_DNSPARSER_TYPE_A:

Modified: gnunet/src/gns/gnunet-gns-fcfsd.c
===================================================================
--- gnunet/src/gns/gnunet-gns-fcfsd.c   2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/gns/gnunet-gns-fcfsd.c   2013-08-11 21:21:56 UTC (rev 28501)
@@ -804,7 +804,7 @@
   GNUNET_assert (MHD_YES == MHD_get_fdset (httpd, &rs, &ws, &es, &max));
   haveto = MHD_get_timeout (httpd, &timeout);
   if (haveto == MHD_YES)
-    tv.rel_value = (uint64_t) timeout;
+    tv.rel_value_us = (uint64_t) timeout * 1000LL;
   else
     tv = GNUNET_TIME_UNIT_FOREVER_REL;
   GNUNET_NETWORK_fdset_copy_native (wrs, &rs, max + 1);

Modified: gnunet/src/gns/gnunet-gns-proxy.c
===================================================================
--- gnunet/src/gns/gnunet-gns-proxy.c   2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/gns/gnunet-gns-proxy.c   2013-08-11 21:21:56 UTC (rev 28501)
@@ -2200,7 +2200,7 @@
   haveto = MHD_get_timeout (hd->daemon, &timeout);
 
   if (MHD_YES == haveto)
-    tv.rel_value = (uint64_t) timeout;
+    tv.rel_value_us = (uint64_t) timeout * 1000LL;
   else
     tv = GNUNET_TIME_UNIT_FOREVER_REL;
   GNUNET_NETWORK_fdset_copy_native (wrs, &rs, max + 1);

Modified: gnunet/src/gns/gnunet-service-gns.c
===================================================================
--- gnunet/src/gns/gnunet-service-gns.c 2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/gns/gnunet-service-gns.c 2013-08-11 21:21:56 UTC (rev 28501)
@@ -427,7 +427,7 @@
                GNUNET_STRINGS_relative_time_to_string (put_interval, 
GNUNET_YES));
     GNUNET_STATISTICS_set (statistics,
                            "Current zone iteration interval (in ms)",
-                           put_interval.rel_value,
+                           put_interval.rel_value_us / 1000LL,
                            GNUNET_NO);
     GNUNET_STATISTICS_update (statistics,
                               "Number of zone iterations", 1, GNUNET_NO);
@@ -545,7 +545,7 @@
 
   GNUNET_STATISTICS_set (statistics,
                         "Current zone iteration interval (ms)",
-                        next_put_interval.rel_value,
+                        next_put_interval.rel_value_us / 1000LL,
                         GNUNET_NO); 
   zone_publish_task = GNUNET_SCHEDULER_add_delayed (next_put_interval,
                                                    &publish_zone_dht_next,

Modified: gnunet/src/gns/gnunet-service-gns_interceptor.c
===================================================================
--- gnunet/src/gns/gnunet-service-gns_interceptor.c     2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/gns/gnunet-service-gns_interceptor.c     2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -141,7 +141,7 @@
         answer_records[i].data.raw.data = (char*)rd[i].data;
       }
       GNUNET_break (0 == (rd[i].flags & 
GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION));
-      answer_records[i].expiration_time.abs_value = rd[i].expiration_time;
+      answer_records[i].expiration_time.abs_value_us = rd[i].expiration_time;
       answer_records[i].class = GNUNET_DNSPARSER_CLASS_INTERNET;//hmmn
     }
     else
@@ -168,7 +168,7 @@
         additional_records[i].data.raw.data = (char*)rd[i].data;
       }
       GNUNET_break (0 == (rd[i].flags & 
GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION));
-      additional_records[i].expiration_time.abs_value = rd[i].expiration_time;
+      additional_records[i].expiration_time.abs_value_us = 
rd[i].expiration_time;
       additional_records[i].class = GNUNET_DNSPARSER_CLASS_INTERNET;//hmmn
     }
   }

Modified: gnunet/src/gns/gnunet-service-gns_resolver.c
===================================================================
--- gnunet/src/gns/gnunet-service-gns_resolver.c        2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/gns/gnunet-service-gns_resolver.c        2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -888,8 +888,10 @@
   char new_name[GNUNET_DNSPARSER_MAX_NAME_LENGTH];
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "GNS_PHASE_REC-%llu: dht lookup for query %s (%llus) timed 
out.\n",
-              rh->id, rh->name, rh->timeout.rel_value);
+              "GNS_PHASE_REC-%llu: dht lookup for query %s (%s) timed out.\n",
+              rh->id, rh->name, 
+             GNUNET_STRINGS_relative_time_to_string (rh->timeout,
+                                                     GNUNET_YES));
   /**
    * Start resolution in bg
    */
@@ -1042,7 +1044,7 @@
 
     namestore_bg_task->node = GNUNET_CONTAINER_heap_insert (ns_task_heap,
                                   namestore_bg_task,
-                                  GNUNET_TIME_absolute_get().abs_value);
+                                  GNUNET_TIME_absolute_get().abs_value_us);
     if (0 < rh->answered)
       rh->proc (rh->proc_cls, rh, num_records, rd);
     else
@@ -1072,7 +1074,7 @@
 
   rh->dht_heap_node = NULL;
 
-  if (GNUNET_TIME_UNIT_FOREVER_REL.rel_value != rh->timeout.rel_value)
+  if (GNUNET_TIME_UNIT_FOREVER_REL.rel_value_us != rh->timeout.rel_value_us)
   {
     /**
      * Update timeout if necessary
@@ -1114,7 +1116,7 @@
     }
     rh->dht_heap_node = GNUNET_CONTAINER_heap_insert (dht_lookup_heap,
                                          rh,
-                                         GNUNET_TIME_absolute_get 
().abs_value);
+                                         GNUNET_TIME_absolute_get 
().abs_value_us);
   }
 
   xquery = htonl (rlh->record_type);
@@ -1169,7 +1171,7 @@
   if (NULL != name)
   {
     rh->status |= RSL_RECORD_EXISTS;
-    if (remaining_time.rel_value == 0)
+    if (remaining_time.rel_value_us == 0)
       rh->status |= RSL_RECORD_EXPIRED;
   }
   if (0 == rd_count)
@@ -1210,8 +1212,8 @@
     
     //FIXME: eh? do I have to handle this here?
     GNUNET_break (0 == (rd[i].flags & 
GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION));
-    et.abs_value = rd[i].expiration_time;
-    if (0 == (GNUNET_TIME_absolute_get_remaining (et)).rel_value)
+    et.abs_value_us = rd[i].expiration_time;
+    if (0 == (GNUNET_TIME_absolute_get_remaining (et)).rel_value_us)
     {
       GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
                  "GNS_PHASE_REC-%llu: This record is expired. Skipping\n",
@@ -1554,7 +1556,7 @@
       rd.data_size = packet->answers[i].data.raw.data_len;
       rd.record_type = packet->answers[i].type;
       rd.flags = 0;
-      rd.expiration_time = packet->answers[i].expiration_time.abs_value;
+      rd.expiration_time = packet->answers[i].expiration_time.abs_value_us;
       finish_lookup (rh, rlh, 1, &rd);
       GNUNET_DNSPARSER_free_packet (packet);
       return;
@@ -1931,9 +1933,10 @@
   char new_name[GNUNET_DNSPARSER_MAX_NAME_LENGTH];
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-             "GNS_PHASE_DELEGATE_DHT-%llu: dht lookup for query %s (%llus) 
timed out.\n",
+             "GNS_PHASE_DELEGATE_DHT-%llu: dht lookup for query %s (%s) timed 
out.\n",
              rh->id, rh->authority_name, 
-             rh->timeout.rel_value);
+             GNUNET_STRINGS_relative_time_to_string (rh->timeout,
+                                                     GNUNET_YES));
 
   rh->status |= RSL_TIMED_OUT;
   rh->timeout_task = GNUNET_SCHEDULER_NO_TASK;
@@ -2058,13 +2061,13 @@
   }
   
   if ((NULL == name) ||
-      (0 == remaining_time.rel_value))
+      (0 == remaining_time.rel_value_us))
   {
     GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
           "GNS_PHASE_DELEGATE_REV-%llu: + Records don't exist or are 
expired.\n",
           rh->id, name);
 
-    if (GNUNET_TIME_UNIT_FOREVER_REL.rel_value != rh->timeout.rel_value)
+    if (GNUNET_TIME_UNIT_FOREVER_REL.rel_value_us != rh->timeout.rel_value_us)
     {
       GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
         "GNS_PHASE_DELEGATE_REV-%llu: Starting background lookup for %s type 
%d\n",
@@ -2291,7 +2294,7 @@
 
       namestore_bg_task->node = GNUNET_CONTAINER_heap_insert (ns_task_heap,
                                     namestore_bg_task,
-                                    GNUNET_TIME_absolute_get().abs_value);
+                                    GNUNET_TIME_absolute_get().abs_value_us);
       namestore_bg_task->qe = GNUNET_NAMESTORE_record_put (namestore_handle,
                                  &nrb->public_key,
                                  name,
@@ -2762,7 +2765,7 @@
                                 &rh->authority, 
                                 &lookup_key);
   rh->dht_heap_node = NULL;
-  if (rh->timeout.rel_value != GNUNET_TIME_UNIT_FOREVER_REL.rel_value)
+  if (rh->timeout.rel_value_us != GNUNET_TIME_UNIT_FOREVER_REL.rel_value_us)
   {
     rh->timeout_cont = &dht_authority_lookup_timeout;
     rh->timeout_cont_cls = rh;
@@ -2788,7 +2791,7 @@
     }
     rh->dht_heap_node = GNUNET_CONTAINER_heap_insert (dht_lookup_heap,
                                                      rh,
-                                                     
GNUNET_TIME_absolute_get().abs_value);
+                                                     
GNUNET_TIME_absolute_get().abs_value_us);
   }
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
              "Beginning DHT lookup for %s in zone %s for request %llu\n",
@@ -3096,7 +3099,7 @@
                GNUNET_short_h2s (&zone));
     rh->status |= RSL_RECORD_EXISTS;
   
-    if (0 == remaining_time.rel_value)
+    if (0 == remaining_time.rel_value_us)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                   "GNS_PHASE_DELEGATE_NS-%llu: Record set %s expired.\n",
@@ -3194,13 +3197,13 @@
        continue;
       }    
       GNUNET_break (0 == (rd[i].flags & 
GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION));
-      et.abs_value = rd[i].expiration_time;
-      if (0 == (GNUNET_TIME_absolute_get_remaining (et)).rel_value)
+      et.abs_value_us = rd[i].expiration_time;
+      if (0 == (GNUNET_TIME_absolute_get_remaining (et)).rel_value_us)
       {
        GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                    "GNS_PHASE_DELEGATE_NS-%llu: This pkey is expired.\n",
                    rh->id);
-       if (remaining_time.rel_value == 0)
+       if (remaining_time.rel_value_us == 0)
        {
          GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                      "GNS_PHASE_DELEGATE_NS-%llu: This dht entry is 
expired.\n",
@@ -3364,7 +3367,7 @@
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "No shorten key for resolution\n");
 
-  if (timeout.rel_value != GNUNET_TIME_UNIT_FOREVER_REL.rel_value)
+  if (timeout.rel_value_us != GNUNET_TIME_UNIT_FOREVER_REL.rel_value_us)
   {
     /*
      * Set timeout for authority lookup phase to 1/2

Modified: gnunet/src/gns/plugin_block_gns.c
===================================================================
--- gnunet/src/gns/plugin_block_gns.c   2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/gns/plugin_block_gns.c   2013-08-11 21:21:56 UTC (rev 28501)
@@ -166,11 +166,12 @@
         record_match++;
       }
     }
-    et.abs_value = exp;
+    et.abs_value_us = exp;
     
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-               "Verifying signature of %d records for name %s with expiration 
of %u\n",
-               rd_count, name, et.abs_value);
+               "Verifying signature of %d records for name %s with expiration 
of %s\n",
+               rd_count, name, 
+               GNUNET_STRINGS_absolute_time_to_string (et));
 
     if (GNUNET_OK != 
        GNUNET_NAMESTORE_verify_signature (&nrb->public_key,

Modified: gnunet/src/gns/test_gns_dht_three_peers.c
===================================================================
--- gnunet/src/gns/test_gns_dht_three_peers.c   2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/gns/test_gns_dht_three_peers.c   2013-08-11 21:21:56 UTC (rev 
28501)
@@ -250,12 +250,14 @@
   end_now ();
 }
 
+
 static void
 commence_testing(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   static int wait = 0;
+
   wait++;
-  if ((ZONE_PUT_WAIT_TIME.rel_value / 1000) == wait)
+  if ((ZONE_PUT_WAIT_TIME.rel_value_us / 1000LL / 1000LL) == wait)
   {
     fprintf (stderr, "\n");
     wait_task = GNUNET_SCHEDULER_NO_TASK;
@@ -274,6 +276,7 @@
   }
 }
 
+
 void
 all_connected ()
 {

Modified: gnunet/src/gns/test_gns_proxy.c
===================================================================
--- gnunet/src/gns/test_gns_proxy.c     2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/gns/test_gns_proxy.c     2013-08-11 21:21:56 UTC (rev 28501)
@@ -422,7 +422,7 @@
   }
 
   host_key = GNUNET_CRYPTO_ecc_key_create_from_file (zone_keyfile);
-  rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value;
+  rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us;
   GNUNET_assert (GNUNET_OK == GNUNET_NAMESTORE_string_to_value 
(GNUNET_GNS_RECORD_A,
                                                                "127.0.0.1",
                                                                
(void**)&rd.data,

Modified: gnunet/src/gns/test_gns_pseu_shorten.c
===================================================================
--- gnunet/src/gns/test_gns_pseu_shorten.c      2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/gns/test_gns_pseu_shorten.c      2013-08-11 21:21:56 UTC (rev 
28501)
@@ -269,7 +269,7 @@
   struct GNUNET_NAMESTORE_RecordData rd;
   
   memset (&rd, 0, sizeof (struct GNUNET_NAMESTORE_RecordData));
-  rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value;
+  rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us;
   rd.data_size = strlen(TEST_PSEU_ALICE)+1;
   rd.data = TEST_PSEU_ALICE;
   rd.record_type = GNUNET_GNS_RECORD_PSEU;

Modified: gnunet/src/gns/test_gns_simple_delegated_lookup.c
===================================================================
--- gnunet/src/gns/test_gns_simple_delegated_lookup.c   2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/gns/test_gns_simple_delegated_lookup.c   2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -247,7 +247,7 @@
                                           GNUNET_TIME_UNIT_FOREVER_ABS,
                                           TEST_RECORD_NAME,
                                           &rd, 1);
-  et.abs_value = rd.expiration_time;
+  et.abs_value_us = rd.expiration_time;
   GNUNET_NAMESTORE_record_put (namestore_handle,
                                &bob_pkey,
                                TEST_RECORD_NAME,

Modified: gnunet/src/gns/test_gns_simple_mx_lookup.c
===================================================================
--- gnunet/src/gns/test_gns_simple_mx_lookup.c  2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/gns/test_gns_simple_mx_lookup.c  2013-08-11 21:21:56 UTC (rev 
28501)
@@ -245,7 +245,7 @@
                                           GNUNET_TIME_UNIT_FOREVER_ABS,
                                           TEST_RECORD_NAME,
                                           &rd, 1);
-  et.abs_value = rd.expiration_time;
+  et.abs_value_us = rd.expiration_time;
   GNUNET_NAMESTORE_record_put (namestore_handle,
                                &bob_pkey,
                                TEST_RECORD_NAME,
@@ -267,7 +267,7 @@
                                           GNUNET_TIME_UNIT_FOREVER_ABS,
                                           GNUNET_GNS_MASTERZONE_STR,
                                           &rd, 1);
-  et.abs_value = rd.expiration_time;
+  et.abs_value_us = rd.expiration_time;
   GNUNET_NAMESTORE_record_put (namestore_handle,
                                &bob_pkey,
                                GNUNET_GNS_MASTERZONE_STR,

Modified: gnunet/src/gns/test_gns_simple_srv_lookup.c
===================================================================
--- gnunet/src/gns/test_gns_simple_srv_lookup.c 2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/gns/test_gns_simple_srv_lookup.c 2013-08-11 21:21:56 UTC (rev 
28501)
@@ -251,7 +251,7 @@
                                           GNUNET_TIME_UNIT_FOREVER_ABS,
                                           TEST_RECORD_NAME,
                                           &rd, 1);
-  et.abs_value = rd.expiration_time;
+  et.abs_value_us = rd.expiration_time;
   GNUNET_NAMESTORE_record_put (namestore_handle,
                                &bob_pkey,
                                TEST_RECORD_NAME,
@@ -274,7 +274,7 @@
                                           GNUNET_TIME_UNIT_FOREVER_ABS,
                                           TEST_RECORD_NAME_SRV,
                                           &rd, 1);
-  et.abs_value = rd.expiration_time;
+  et.abs_value_us = rd.expiration_time;
   GNUNET_NAMESTORE_record_put (namestore_handle,
                                &bob_pkey,
                                TEST_RECORD_NAME_SRV,

Modified: gnunet/src/hello/hello.c
===================================================================
--- gnunet/src/hello/hello.c    2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/hello/hello.c    2013-08-11 21:21:56 UTC (rev 28501)
@@ -382,8 +382,8 @@
   ec.found = GNUNET_NO;
   GNUNET_HELLO_iterate_addresses (mc->other, GNUNET_NO, &get_match_exp, &ec);
   if ((ec.found == GNUNET_NO) ||
-      (ec.expiration.abs_value < expiration.abs_value) ||
-      ((ec.expiration.abs_value == expiration.abs_value) &&
+      (ec.expiration.abs_value_us < expiration.abs_value_us) ||
+      ((ec.expiration.abs_value_us == expiration.abs_value_us) &&
        (mc->take_equal == GNUNET_YES)))
   {
     mc->ret +=
@@ -465,8 +465,8 @@
   GNUNET_HELLO_iterate_addresses (dc->old_hello, GNUNET_NO, &get_match_exp,
                                   &ec);
   if ((ec.found == GNUNET_YES) &&
-      ((ec.expiration.abs_value > expiration.abs_value) ||
-       (ec.expiration.abs_value >= dc->expiration_limit.abs_value)))
+      ((ec.expiration.abs_value_us > expiration.abs_value_us) ||
+       (ec.expiration.abs_value_us >= dc->expiration_limit.abs_value_us)))
     return GNUNET_YES;          /* skip */
   ret = dc->it (dc->it_cls, address, expiration);
   return ret;
@@ -609,12 +609,12 @@
 {
   struct EqualsContext *ec = cls;
 
-  if (expiration.abs_value < ec->expiration_limit.abs_value)
+  if (expiration.abs_value_us < ec->expiration_limit.abs_value_us)
     return GNUNET_YES;
   if (0 == GNUNET_HELLO_address_cmp (address, ec->address))
   {
     ec->found = GNUNET_YES;
-    if (expiration.abs_value < ec->expiration.abs_value)
+    if (expiration.abs_value_us < ec->expiration.abs_value_us)
       ec->result = GNUNET_TIME_absolute_min (expiration, ec->result);
     return GNUNET_SYSERR;
   }
@@ -628,7 +628,7 @@
 {
   struct EqualsContext *ec = cls;
 
-  if (expiration.abs_value < ec->expiration_limit.abs_value)
+  if (expiration.abs_value_us < ec->expiration_limit.abs_value_us)
     return GNUNET_YES;
   ec->address = address;
   ec->expiration = expiration;
@@ -677,7 +677,7 @@
   ec.result = GNUNET_TIME_UNIT_FOREVER_ABS;
   ec.h2 = h2;
   GNUNET_HELLO_iterate_addresses (h1, GNUNET_NO, &find_matching, &ec);
-  if (ec.result.abs_value == GNUNET_TIME_UNIT_ZERO.rel_value)
+  if (ec.result.abs_value_us == GNUNET_TIME_UNIT_ZERO.rel_value_us)
     return ec.result;
   ec.h2 = h1;
   GNUNET_HELLO_iterate_addresses (h2, GNUNET_NO, &find_matching, &ec);
@@ -707,7 +707,7 @@
 {
   struct GNUNET_TIME_Absolute ret;
 
-  ret.abs_value = 0;
+  ret.abs_value_us = 0;
   GNUNET_HELLO_iterate_addresses (msg, GNUNET_NO, &find_min_expire, &ret);
   return ret;
 }
@@ -843,7 +843,7 @@
       characters in URIs */
   uri_addr = map_characters (addr_dup, "[]", "()");
   GNUNET_free (addr_dup);
-  seconds = expiration.abs_value / 1000;
+  seconds = expiration.abs_value_us / 1000LL / 1000LL;
   t = gmtime (&seconds);
 
   GNUNET_asprintf (&ret,
@@ -956,7 +956,7 @@
       GNUNET_break (0);
       return 0;
     }
-    expire.abs_value = expiration_seconds * 1000;
+    expire.abs_value_us = expiration_seconds * 1000LL * 1000LL;
   }
   if ('!' != tname[0])
   {

Modified: gnunet/src/hostlist/hostlist-client.c
===================================================================
--- gnunet/src/hostlist/hostlist-client.c       2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/hostlist/hostlist-client.c       2013-08-11 21:21:56 UTC (rev 
28501)
@@ -793,7 +793,7 @@
     clean_up ();
     return;
   }
-  if (GNUNET_TIME_absolute_get_remaining (end_time).rel_value == 0)
+  if (0 == GNUNET_TIME_absolute_get_remaining (end_time).rel_value_us)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                 _("Timeout trying to download hostlist from `%s'\n"),
@@ -1023,19 +1023,20 @@
         GNUNET_SCHEDULER_add_now (&task_download_dispatcher, NULL);
 
   delay = hostlist_delay;
-  if (hostlist_delay.rel_value == 0)
+  if (0 == hostlist_delay.rel_value_us)
     hostlist_delay = GNUNET_TIME_UNIT_SECONDS;
   else
     hostlist_delay = GNUNET_TIME_relative_multiply (hostlist_delay, 2);
-  if (hostlist_delay.rel_value >
-      GNUNET_TIME_UNIT_HOURS.rel_value * (1 + stat_connection_count))
+  if (hostlist_delay.rel_value_us >
+      GNUNET_TIME_UNIT_HOURS.rel_value_us * (1 + stat_connection_count))
     hostlist_delay =
         GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_HOURS,
                                        (1 + stat_connection_count));
   GNUNET_STATISTICS_set (stats,
                          gettext_noop
                          ("# milliseconds between hostlist downloads"),
-                         hostlist_delay.rel_value, GNUNET_YES);
+                         hostlist_delay.rel_value_us / 1000LL, 
+                        GNUNET_YES);
   if (0 == once)
   {
     delay = GNUNET_TIME_UNIT_ZERO;
@@ -1194,8 +1195,9 @@
                                     &task_testing_intervall_reset, NULL);
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "Testing new hostlist advertisements is locked for the next %u 
ms\n",
-              TESTING_INTERVAL.rel_value);
+              "Testing new hostlist advertisements is locked for the next 
%s\n",
+              GNUNET_STRINGS_relative_time_to_string (TESTING_INTERVAL,
+                                                     GNUNET_YES));
 
   ti_download_dispatcher_task =
       GNUNET_SCHEDULER_add_now (&task_download_dispatcher, NULL);
@@ -1223,11 +1225,14 @@
 }
 
 
+/**
+ * @param value previous delay value, in milliseconds (!)
+ */
 static int
 process_stat (void *cls, const char *subsystem, const char *name,
               uint64_t value, int is_persistent)
 {
-  hostlist_delay.rel_value = value;
+  hostlist_delay.rel_value_us = value * 1000LL;
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Initial time between hostlist downloads is %s\n",
               GNUNET_STRINGS_relative_time_to_string (hostlist_delay, 
GNUNET_YES));
@@ -1298,8 +1303,8 @@
     hostlist->hostlist_uri = (const char *) &hostlist[1];
     memcpy (&hostlist[1], uri, strlen (uri) + 1);
     hostlist->quality = quality;
-    hostlist->time_creation.abs_value = created;
-    hostlist->time_last_usage.abs_value = last_used;
+    hostlist->time_creation.abs_value_us = created;
+    hostlist->time_last_usage.abs_value_us = last_used;
     GNUNET_CONTAINER_DLL_insert (linked_list_head, linked_list_tail, hostlist);
     linked_list_size++;
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -1382,9 +1387,9 @@
           (GNUNET_OK != GNUNET_BIO_write_int32 (wh, pos->times_used)) ||
           (GNUNET_OK != GNUNET_BIO_write_int64 (wh, pos->quality)) ||
           (GNUNET_OK !=
-           GNUNET_BIO_write_int64 (wh, pos->time_last_usage.abs_value)) ||
+           GNUNET_BIO_write_int64 (wh, pos->time_last_usage.abs_value_us)) ||
           (GNUNET_OK !=
-           GNUNET_BIO_write_int64 (wh, pos->time_creation.abs_value)) ||
+           GNUNET_BIO_write_int64 (wh, pos->time_creation.abs_value_us)) ||
           (GNUNET_OK != GNUNET_BIO_write_int32 (wh, pos->hello_count)))
       {
         GNUNET_log (GNUNET_ERROR_TYPE_WARNING,

Modified: gnunet/src/hostlist/hostlist-server.c
===================================================================
--- gnunet/src/hostlist/hostlist-server.c       2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/hostlist/hostlist-server.c       2013-08-11 21:21:56 UTC (rev 
28501)
@@ -155,7 +155,7 @@
 {
   int *arg = cls;
 
-  if (GNUNET_TIME_absolute_get_remaining (expiration).rel_value == 0)
+  if (0 == GNUNET_TIME_absolute_get_remaining (expiration).rel_value_us)
   {
     GNUNET_STATISTICS_update (stats,
                               gettext_noop ("expired addresses encountered"), 
1,
@@ -504,7 +504,7 @@
   GNUNET_assert (MHD_YES == MHD_get_fdset (daemon_handle, &rs, &ws, &es, 
&max));
   haveto = MHD_get_timeout (daemon_handle, &timeout);
   if (haveto == MHD_YES)
-    tv.rel_value = (uint64_t) timeout;
+    tv.rel_value_us = (uint64_t) timeout;
   else
     tv = GNUNET_TIME_UNIT_FOREVER_REL;
   GNUNET_NETWORK_fdset_copy_native (wrs, &rs, max + 1);

Modified: gnunet/src/identity/identity_api.c
===================================================================
--- gnunet/src/identity/identity_api.c  2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/identity/identity_api.c  2013-08-11 21:21:56 UTC (rev 28501)
@@ -186,7 +186,7 @@
 
   if (NULL != anon.pk)
     return &anon;
-  anon.pk = GNUNET_CRYPTO_ecc_key_get_anonymous ();
+  anon.pk = (struct GNUNET_CRYPTO_EccPrivateKey *) 
GNUNET_CRYPTO_ecc_key_get_anonymous ();
   GNUNET_CRYPTO_ecc_key_get_public (anon.pk,
                                    &pub);
   GNUNET_CRYPTO_hash (&pub, sizeof (pub), &anon.id);

Modified: gnunet/src/include/gnunet_ats_service.h
===================================================================
--- gnunet/src/include/gnunet_ats_service.h     2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/include/gnunet_ats_service.h     2013-08-11 21:21:56 UTC (rev 
28501)
@@ -133,7 +133,7 @@
    * Delay
    * Time between when the time packet is sent and the packet arrives
    *
-   * Unit: [ms]
+   * Unit: [microseconds]
    *
    * Examples:
    *
@@ -905,8 +905,8 @@
    * Change the peer's latency value to the given amount.  The
    * argument is followed by a double value giving the desired value
    * (can be negative).  The absolute score in the goal function is
-   * the inverse of the latency in ms (minimum: 1 ms) multiplied by
-   * the latency preferences.
+   * the inverse of the latency in microseconds (minimum: 1
+   * microsecond) multiplied by the latency preferences.
    */
   GNUNET_ATS_PREFERENCE_LATENCY
 };

Modified: gnunet/src/include/gnunet_client_lib.h
===================================================================
--- gnunet/src/include/gnunet_client_lib.h      2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/include/gnunet_client_lib.h      2013-08-11 21:21:56 UTC (rev 
28501)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2013 Christian 
Grothoff (and other contributing authors)
+     (C) 2001-2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published

Modified: gnunet/src/include/gnunet_resolver_service.h
===================================================================
--- gnunet/src/include/gnunet_resolver_service.h        2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/include/gnunet_resolver_service.h        2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -1,10 +1,10 @@
 /*
      This file is part of GNUnet.
-     (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 Christian Grothoff 
(and other contributing authors)
+     (C) 2001-2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
-     by the Free Software Foundation; either version 2, or (at your
+     by the Free Software Foundation; either version 3, or (at your
      option) any later version.
 
      GNUnet is distributed in the hope that it will be useful, but

Modified: gnunet/src/include/gnunet_scheduler_lib.h
===================================================================
--- gnunet/src/include/gnunet_scheduler_lib.h   2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/include/gnunet_scheduler_lib.h   2013-08-11 21:21:56 UTC (rev 
28501)
@@ -1,10 +1,10 @@
 /*
       This file is part of GNUnet
-      (C) 2009, 2011 Christian Grothoff (and other contributing authors)
+      (C) 2009-2013 Christian Grothoff (and other contributing authors)
 
       GNUnet is free software; you can redistribute it and/or modify
       it under the terms of the GNU General Public License as published
-      by the Free Software Foundation; either version 2, or (at your
+      by the Free Software Foundation; either version 3, or (at your
       option) any later version.
 
       GNUnet is distributed in the hope that it will be useful, but

Modified: gnunet/src/include/gnunet_server_lib.h
===================================================================
--- gnunet/src/include/gnunet_server_lib.h      2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/include/gnunet_server_lib.h      2013-08-11 21:21:56 UTC (rev 
28501)
@@ -1,10 +1,10 @@
 /*
      This file is part of GNUnet.
-     (C) 2009, 2010 Christian Grothoff (and other contributing authors)
+     (C) 2009-2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
-     by the Free Software Foundation; either version 2, or (at your
+     by the Free Software Foundation; either version 3, or (at your
      option) any later version.
 
      GNUnet is distributed in the hope that it will be useful, but

Modified: gnunet/src/include/gnunet_time_lib.h
===================================================================
--- gnunet/src/include/gnunet_time_lib.h        2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/include/gnunet_time_lib.h        2013-08-11 21:21:56 UTC (rev 
28501)
@@ -1,10 +1,10 @@
 /*
      This file is part of GNUnet.
-     (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 Christian Grothoff 
(and other contributing authors)
+     (C) 2001-2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
-     by the Free Software Foundation; either version 2, or (at your
+     by the Free Software Foundation; either version 3, or (at your
      option) any later version.
 
      GNUnet is distributed in the hope that it will be useful, but
@@ -39,18 +39,18 @@
 #include "gnunet_common.h"
 
 /**
- * Time for absolute times used by GNUnet, in milliseconds.
+ * Time for absolute times used by GNUnet, in microseconds.
  */
 struct GNUNET_TIME_Absolute
 {
   /**
    * The actual value.
    */
-  uint64_t abs_value;
+  uint64_t abs_value_us;
 };
 
 /**
- * Time for relative time used by GNUnet, in milliseconds.
+ * Time for relative time used by GNUnet, in microseconds.
  * Always positive, so we can only refer to future time.
  */
 struct GNUNET_TIME_Relative
@@ -58,32 +58,32 @@
   /**
    * The actual value.
    */
-  uint64_t rel_value;
+  uint64_t rel_value_us;
 };
 
 GNUNET_NETWORK_STRUCT_BEGIN
 
 /**
- * Time for relative time used by GNUnet, in milliseconds and in network byte 
order.
+ * Time for relative time used by GNUnet, in microseconds and in network byte 
order.
  */
 struct GNUNET_TIME_RelativeNBO
 {
   /**
    * The actual value (in network byte order).
    */
-  uint64_t rel_value__ GNUNET_PACKED;
+  uint64_t rel_value_us__ GNUNET_PACKED;
 };
 
 
 /**
- * Time for absolute time used by GNUnet, in milliseconds and in network byte 
order.
+ * Time for absolute time used by GNUnet, in microseconds and in network byte 
order.
  */
 struct GNUNET_TIME_AbsoluteNBO
 {
   /**
    * The actual value (in network byte order).
    */
-  uint64_t abs_value__ GNUNET_PACKED;
+  uint64_t abs_value_us__ GNUNET_PACKED;
 };
 GNUNET_NETWORK_STRUCT_END
 
@@ -98,11 +98,16 @@
 #define GNUNET_TIME_UNIT_ZERO_ABS GNUNET_TIME_absolute_get_zero_()
 
 /**
- * One millisecond, our basic time unit.
+ * One microsecond, our basic time unit.
  */
-#define GNUNET_TIME_UNIT_MILLISECONDS GNUNET_TIME_relative_get_unit_()
+#define GNUNET_TIME_UNIT_MICROSECONDS GNUNET_TIME_relative_get_unit_()
 
 /**
+ * One millisecond.
+ */
+#define GNUNET_TIME_UNIT_MILLISECONDS GNUNET_TIME_relative_get_millisecond_()
+
+/**
  * One second.
  */
 #define GNUNET_TIME_UNIT_SECONDS GNUNET_TIME_relative_get_second_()
@@ -181,13 +186,20 @@
 
 
 /**
- * Return relative time of 1ms.
+ * Return relative time of 1 microsecond.
  */
 struct GNUNET_TIME_Relative
 GNUNET_TIME_relative_get_unit_ (void);
 
 
 /**
+ * Return relative time of 1ms.
+ */
+struct GNUNET_TIME_Relative
+GNUNET_TIME_relative_get_millisecond_ (void);
+
+
+/**
  * Return relative time of 1s.
  */
 struct GNUNET_TIME_Relative

Modified: gnunet/src/mesh/gnunet-service-mesh-enc.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh-enc.c   2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/mesh/gnunet-service-mesh-enc.c   2013-08-11 21:21:56 UTC (rev 
28501)
@@ -1926,8 +1926,8 @@
   if (GNUNET_YES == peer_is_used (p))
     return GNUNET_YES;
 
-  if (abs->abs_value < p->last_contact.abs_value)
-    abs->abs_value = p->last_contact.abs_value;
+  if (abs->abs_value_us < p->last_contact.abs_value_us)
+    abs->abs_value_us = p->last_contact.abs_value_us;
 
   return GNUNET_YES;
 }
@@ -1948,7 +1948,7 @@
   struct MeshPeer *p = value;
   struct GNUNET_TIME_Absolute *abs = cls;
 
-  if (p->last_contact.abs_value == abs->abs_value &&
+  if (p->last_contact.abs_value_us == abs->abs_value_us &&
       GNUNET_NO == peer_is_used (p))
   {
     peer_destroy (p);
@@ -3199,9 +3199,9 @@
 
   rel = copy->rel;
   time = GNUNET_TIME_absolute_get_duration (copy->timestamp);
-  rel->expected_delay.rel_value *= 7;
-  rel->expected_delay.rel_value += time.rel_value;
-  rel->expected_delay.rel_value /= 8;
+  rel->expected_delay.rel_value_us *= 7;
+  rel->expected_delay.rel_value_us += time.rel_value_us;
+  rel->expected_delay.rel_value_us /= 8;
   rel->n_sent--;
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "!!! Freeing %u\n", copy->mid);
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "    n_sent %u\n", rel->n_sent);

Modified: gnunet/src/mesh/gnunet-service-mesh.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh.c       2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/mesh/gnunet-service-mesh.c       2013-08-11 21:21:56 UTC (rev 
28501)
@@ -2709,9 +2709,9 @@
 
   rel = copy->rel;
   time = GNUNET_TIME_absolute_get_duration (copy->timestamp);
-  rel->expected_delay.rel_value *= 7;
-  rel->expected_delay.rel_value += time.rel_value;
-  rel->expected_delay.rel_value /= 8;
+  rel->expected_delay.rel_value_us *= 7;
+  rel->expected_delay.rel_value_us += time.rel_value_us;
+  rel->expected_delay.rel_value_us /= 8;
   rel->n_sent--;
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "!!! Freeing %u\n", copy->mid);
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "    n_sent %u\n", rel->n_sent);

Modified: gnunet/src/mesh/mesh_api.c
===================================================================
--- gnunet/src/mesh/mesh_api.c  2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/mesh/mesh_api.c  2013-08-11 21:21:56 UTC (rev 28501)
@@ -564,7 +564,7 @@
               struct GNUNET_MESH_TransmitHandle *th)
 {
   GNUNET_CONTAINER_DLL_insert_tail (h->th_head, h->th_tail, th);
-  if (GNUNET_TIME_UNIT_FOREVER_ABS.abs_value == th->timeout.abs_value)
+  if (GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us == th->timeout.abs_value_us)
     return;
   th->timeout_task =
       GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_absolute_get_remaining

Modified: gnunet/src/mesh/mesh_api_enc.c
===================================================================
--- gnunet/src/mesh/mesh_api_enc.c      2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/mesh/mesh_api_enc.c      2013-08-11 21:21:56 UTC (rev 28501)
@@ -551,7 +551,7 @@
               struct GNUNET_MESH_TransmitHandle *th)
 {
   GNUNET_CONTAINER_DLL_insert_tail (h->th_head, h->th_tail, th);
-  if (GNUNET_TIME_UNIT_FOREVER_ABS.abs_value == th->timeout.abs_value)
+  if (GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us == th->timeout.abs_value_us)
     return;
   th->timeout_task =
       GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_absolute_get_remaining

Modified: gnunet/src/mesh/test_mesh_small.c
===================================================================
--- gnunet/src/mesh/test_mesh_small.c   2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/mesh/test_mesh_small.c   2013-08-11 21:21:56 UTC (rev 28501)
@@ -192,14 +192,15 @@
   end_time = GNUNET_TIME_absolute_get();
   total_time = GNUNET_TIME_absolute_get_difference(start_time, end_time);
   FPRINTF (stderr, "\nResults of test \"%s\"\n", test_name);
-  FPRINTF (stderr, "Test time %llu ms\n",
-            (unsigned long long) total_time.rel_value);
+  FPRINTF (stderr, "Test time %s\n",
+          GNUNET_STRINGS_relative_time_to_string (total_time,
+                                                  GNUNET_YES));
   FPRINTF (stderr, "Test bandwidth: %f kb/s\n",
-            4 * TOTAL_PACKETS * 1.0 / total_time.rel_value); // 4bytes * ms
+          4 * TOTAL_PACKETS * 1.0 / (total_time.rel_value_us / 1000)); // 
4bytes * ms
   FPRINTF (stderr, "Test throughput: %f packets/s\n\n",
-            TOTAL_PACKETS * 1000.0 / total_time.rel_value); // packets * ms
+          TOTAL_PACKETS * 1000.0 / (total_time.rel_value_us / 1000)); // 
packets * ms
   GAUGER ("MESH", test_name,
-          TOTAL_PACKETS * 1000.0 / total_time.rel_value,
+          TOTAL_PACKETS * 1000.0 / (total_time.rel_value_us / 1000),
           "packets/s");
 }
 

Modified: gnunet/src/namestore/gnunet-namestore.c
===================================================================
--- gnunet/src/namestore/gnunet-namestore.c     2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/namestore/gnunet-namestore.c     2013-08-11 21:21:56 UTC (rev 
28501)
@@ -345,12 +345,12 @@
     }
     if (0 != (rd[i].flags & GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION))
     {
-      rex.rel_value = rd[i].expiration_time;
+      rex.rel_value_us = rd[i].expiration_time;
       etime = GNUNET_STRINGS_relative_time_to_string (rex, GNUNET_YES);
     }
     else
     {
-      aex.abs_value = rd[i].expiration_time;
+      aex.abs_value_us = rd[i].expiration_time;
       etime = GNUNET_STRINGS_absolute_time_to_string (aex);
     }
     FPRINTF (stdout, "\t%s: %s (%s %s)\n", typestring, s, 
@@ -418,12 +418,12 @@
   rde->record_type = type;
   if (GNUNET_YES == etime_is_rel)
   {
-    rde->expiration_time = etime_rel.rel_value;
+    rde->expiration_time = etime_rel.rel_value_us;
     rde->flags |= GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION;
   }
   else if (GNUNET_NO == etime_is_rel)
   {
-    rde->expiration_time = etime_abs.abs_value;
+    rde->expiration_time = etime_abs.abs_value_us;
   }
   if (1 != nonauthority)
     rde->flags |= GNUNET_NAMESTORE_RF_AUTHORITY;
@@ -658,13 +658,13 @@
     rd.record_type = GNUNET_NAMESTORE_TYPE_PKEY;
     if (GNUNET_YES == etime_is_rel)
     {
-      rd.expiration_time = etime_rel.rel_value;
+      rd.expiration_time = etime_rel.rel_value_us;
       rd.flags |= GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION;
     }
     else if (GNUNET_NO == etime_is_rel)
-      rd.expiration_time = etime_abs.abs_value;
+      rd.expiration_time = etime_abs.abs_value_us;
     else    
-      rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value;
+      rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us;
     if (1 != nonauthority)
       rd.flags |= GNUNET_NAMESTORE_RF_AUTHORITY;
     add_qe_uri = GNUNET_NAMESTORE_record_put_by_authority (ns,

Modified: gnunet/src/namestore/gnunet-service-namestore.c
===================================================================
--- gnunet/src/namestore/gnunet-service-namestore.c     2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/namestore/gnunet-service-namestore.c     2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -442,12 +442,12 @@
   {
     if (0 != (rd[c].flags & GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION))
     {
-      rt.rel_value = rd[c].expiration_time;
+      rt.rel_value_us = rd[c].expiration_time;
       at = GNUNET_TIME_relative_to_absolute (rt);
     }
     else
     {
-      at.abs_value = rd[c].expiration_time;
+      at.abs_value_us = rd[c].expiration_time;
     }
     expire = GNUNET_TIME_absolute_min (at, expire);  
   }
@@ -742,16 +742,16 @@
        {
          GNUNET_break (GNUNET_YES == authoritative);
          rd_modified = GNUNET_YES;
-         re.rel_value = rd[c].expiration_time;
+         re.rel_value_us = rd[c].expiration_time;
          e = GNUNET_TIME_relative_to_absolute (re);
        }
        else
        {
-         e.abs_value = rd[c].expiration_time;
+         e.abs_value_us = rd[c].expiration_time;
        }
        /* found matching record, copy and convert flags to public format */
        rd_selected[copied_elements] = rd[c]; /* shallow copy! */
-       rd_selected[copied_elements].expiration_time = e.abs_value;
+       rd_selected[copied_elements].expiration_time = e.abs_value_us;
        if (0 != (rd_selected[copied_elements].flags &
                  (GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION | 
GNUNET_NAMESTORE_RF_AUTHORITY)))
        {
@@ -1609,8 +1609,8 @@
         (0 != (rd[c].flags & GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION)) )
     {
       /* should convert relative-to-absolute expiration time */
-      rt.rel_value = rd[c].expiration_time;
-      rd_filtered[c].expiration_time = GNUNET_TIME_relative_to_absolute 
(rt).abs_value;
+      rt.rel_value_us = rd[c].expiration_time;
+      rd_filtered[c].expiration_time = GNUNET_TIME_relative_to_absolute 
(rt).abs_value_us;
       rd_filtered[c].flags &= ~ GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION;
     }
     /* we NEVER keep the 'authority' flag */
@@ -1637,10 +1637,10 @@
 
 
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                 "Creating signature for `%s' in zone `%s' with %u records and 
expiration %llu\n",
+                 "Creating signature for `%s' in zone `%s' with %u records and 
expiration %s\n",
                  name, GNUNET_NAMESTORE_short_h2s(&zone_hash), 
                  rd_count_filtered,
-                 (unsigned long long) expire.abs_value);
+                 GNUNET_STRINGS_absolute_time_to_string (expire));
       /* TODO 1) AB: New publishing
        * - Create HDKF(Q,i)
        * - Encrypt record block R with HKDF: HDKF(Q,i) == E(R)
@@ -1671,9 +1671,9 @@
       if (NULL != signature)
        {
          GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 
-                     "Using provided signature for `%s' in zone `%s' with %u 
records and expiration %llu\n",
+                     "Using provided signature for `%s' in zone `%s' with %u 
records and expiration %s\n",
                      name, GNUNET_NAMESTORE_short_h2s (&zone_hash), 
rd_count_filtered, 
-                     (unsigned long long) expire.abs_value);
+                     GNUNET_STRINGS_absolute_time_to_string (expire));
          return;
        }    
     }

Modified: gnunet/src/namestore/namestore_api_common.c
===================================================================
--- gnunet/src/namestore/namestore_api_common.c 2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/namestore/namestore_api_common.c 2013-08-11 21:21:56 UTC (rev 
28501)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2009, 2010, 2012 Christian Grothoff (and other contributing authors)
+     (C) 2009-2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -747,8 +747,8 @@
 
   if (0 != (rd->flags & GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION))
     return GNUNET_NO;
-  at.abs_value = rd->expiration_time;
-  return (0 == GNUNET_TIME_absolute_get_remaining (at).rel_value) ? GNUNET_YES 
: GNUNET_NO;
+  at.abs_value_us = rd->expiration_time;
+  return (0 == GNUNET_TIME_absolute_get_remaining (at).rel_value_us) ? 
GNUNET_YES : GNUNET_NO;
 }
 
 

Modified: gnunet/src/namestore/plugin_namestore_postgres.c
===================================================================
--- gnunet/src/namestore/plugin_namestore_postgres.c    2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/namestore/plugin_namestore_postgres.c    2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -311,7 +311,7 @@
   }
   {
     char data[data_size];
-    uint64_t expire_be = GNUNET_htonll (expire.abs_value);
+    uint64_t expire_be = GNUNET_htonll (expire.abs_value_us);
     uint64_t rvalue_be = GNUNET_htonll (rvalue);
     uint32_t rd_count_be = htonl ((uint32_t) rd_count);
     const char *paramValues[] = {
@@ -421,7 +421,7 @@
   record_count = ntohl (*(uint32_t *) PQgetvalue (res, 0, 2));
   data_size = PQgetlength (res, 0, 3);
   data = PQgetvalue (res, 0, 3);
-  expiration.abs_value =
+  expiration.abs_value_us =
     GNUNET_ntohll (*(uint64_t *) PQgetvalue (res, 0, 4));
   sig = (const struct GNUNET_CRYPTO_EccSignature*) PQgetvalue (res, 0, 5);
   if (record_count > 64 * 1024)

Modified: gnunet/src/namestore/plugin_namestore_sqlite.c
===================================================================
--- gnunet/src/namestore/plugin_namestore_sqlite.c      2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/namestore/plugin_namestore_sqlite.c      2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -501,7 +501,7 @@
        (SQLITE_OK != sqlite3_bind_text (plugin->put_records, 2, name, -1, 
SQLITE_STATIC)) ||
        (SQLITE_OK != sqlite3_bind_int (plugin->put_records, 3, rd_count)) ||
        (SQLITE_OK != sqlite3_bind_blob (plugin->put_records, 4, data, 
data_size, SQLITE_STATIC)) ||
-       (SQLITE_OK != sqlite3_bind_int64 (plugin->put_records, 5, 
expire.abs_value)) ||
+       (SQLITE_OK != sqlite3_bind_int64 (plugin->put_records, 5, 
expire.abs_value_us)) ||
        (SQLITE_OK != sqlite3_bind_blob (plugin->put_records, 6, signature, 
sizeof (struct GNUNET_CRYPTO_EccSignature), SQLITE_STATIC)) ||
        (SQLITE_OK != sqlite3_bind_blob (plugin->put_records, 7, 
&zone_delegation, sizeof (struct GNUNET_CRYPTO_ShortHashCode), SQLITE_STATIC)) 
||
        (SQLITE_OK != sqlite3_bind_blob (plugin->put_records, 8, &zone, sizeof 
(struct GNUNET_CRYPTO_ShortHashCode), SQLITE_STATIC)) ||
@@ -575,7 +575,7 @@
     record_count = sqlite3_column_int (stmt, 2);
     data_size = sqlite3_column_bytes (stmt, 3);
     data = sqlite3_column_blob (stmt, 3);
-    expiration.abs_value = (uint64_t) sqlite3_column_int64 (stmt, 4);
+    expiration.abs_value_us = (uint64_t) sqlite3_column_int64 (stmt, 4);
     sig = sqlite3_column_blob (stmt, 5);
 
     if ( (sizeof (struct GNUNET_CRYPTO_EccPublicKey) != sqlite3_column_bytes 
(stmt, 0)) ||

Modified: gnunet/src/namestore/test_namestore_api.c
===================================================================
--- gnunet/src/namestore/test_namestore_api.c   2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/namestore/test_namestore_api.c   2013-08-11 21:21:56 UTC (rev 
28501)
@@ -153,7 +153,7 @@
   GNUNET_CRYPTO_ecc_key_get_public (privkey, &pubkey);
   GNUNET_CRYPTO_short_hash (&pubkey, sizeof (pubkey), &zone);
   memset (&signature, '\0', sizeof (signature));
-  rd.expiration_time = GNUNET_TIME_absolute_get().abs_value;
+  rd.expiration_time = GNUNET_TIME_absolute_get().abs_value_us;
   rd.record_type = TEST_RECORD_TYPE;
   rd.data_size = TEST_RECORD_DATALEN;
   rd.data = GNUNET_malloc (TEST_RECORD_DATALEN);

Modified: gnunet/src/namestore/test_namestore_api_create.c
===================================================================
--- gnunet/src/namestore/test_namestore_api_create.c    2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/namestore/test_namestore_api_create.c    2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -316,7 +316,7 @@
   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 = TEST_RECORD_TYPE;
     rd[c].data_size = TEST_RECORD_DATALEN;
     rd[c].data = GNUNET_malloc(TEST_RECORD_DATALEN);

Modified: gnunet/src/namestore/test_namestore_api_create_update.c
===================================================================
--- gnunet/src/namestore/test_namestore_api_create_update.c     2013-08-11 
20:40:36 UTC (rev 28500)
+++ gnunet/src/namestore/test_namestore_api_create_update.c     2013-08-11 
21:21:56 UTC (rev 28501)
@@ -146,7 +146,7 @@
   if (success == GNUNET_OK)
   {
     res = 0;
-    s_first_record->expiration_time = GNUNET_TIME_absolute_get ().abs_value;
+    s_first_record->expiration_time = GNUNET_TIME_absolute_get ().abs_value_us;
     GNUNET_NAMESTORE_record_put_by_authority (nsh, privkey, s_name,
                                              1, s_first_record,
                                              &create_updated_cont, s_name);
@@ -239,7 +239,7 @@
   char rd_ser[rd_ser_len];
   GNUNET_NAMESTORE_records_serialize(1, s_first_record, rd_ser_len, rd_ser);
 
-  et.abs_value = s_first_record->expiration_time;
+  et.abs_value_us = s_first_record->expiration_time;
   s_signature = GNUNET_NAMESTORE_create_signature(privkey, et, s_name, 
s_first_record, 1);
 
   /* create random zone hash */

Modified: gnunet/src/namestore/test_namestore_api_lookup.c
===================================================================
--- gnunet/src/namestore/test_namestore_api_lookup.c    2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/namestore/test_namestore_api_lookup.c    2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -200,7 +200,7 @@
   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 = TEST_RECORD_TYPE;
     rd[c].data_size = TEST_RECORD_DATALEN;
     rd[c].data = GNUNET_malloc(TEST_RECORD_DATALEN);
@@ -237,7 +237,7 @@
     GNUNET_NAMESTORE_records_serialize(RECORDS, s_rd, rd_ser_len, rd_ser);
 
     /* sign */
-    et.abs_value = s_rd[0].expiration_time;
+    et.abs_value_us = s_rd[0].expiration_time;
     s_signature = GNUNET_NAMESTORE_create_signature (privkey, et, s_name, 
                                                     s_rd, RECORDS);
     

Modified: gnunet/src/namestore/test_namestore_api_lookup_specific_type.c
===================================================================
--- gnunet/src/namestore/test_namestore_api_lookup_specific_type.c      
2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/namestore/test_namestore_api_lookup_specific_type.c      
2013-08-11 21:21:56 UTC (rev 28501)
@@ -250,13 +250,13 @@
   rd = GNUNET_malloc (count * sizeof (struct GNUNET_NAMESTORE_RecordData));
   for (c = 0; c < count-1; 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 = 1;
     rd[c].data_size = TEST_RECORD_DATALEN;
     rd[c].data = GNUNET_malloc(TEST_RECORD_DATALEN);
     memset ((char *) rd[c].data, TEST_RECORD_DATA, TEST_RECORD_DATALEN);
   }
-  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 = TEST_RECORD_LOOKUP_TYPE_EXISTING;
   rd[c].data_size = TEST_RECORD_DATALEN;
   rd[c].data = GNUNET_malloc(TEST_RECORD_DATALEN);
@@ -296,7 +296,7 @@
     GNUNET_NAMESTORE_records_serialize(RECORDS, s_rd, rd_ser_len, rd_ser);
 
     /* sign */
-    et.abs_value = s_rd[RECORDS - 1].expiration_time;
+    et.abs_value_us = s_rd[RECORDS - 1].expiration_time;
     s_signature = GNUNET_NAMESTORE_create_signature(privkey, et, s_name, s_rd, 
RECORDS);
 
     /* create random zone hash */

Modified: gnunet/src/namestore/test_namestore_api_monitoring.c
===================================================================
--- gnunet/src/namestore/test_namestore_api_monitoring.c        2013-08-11 
20:40:36 UTC (rev 28500)
+++ gnunet/src/namestore/test_namestore_api_monitoring.c        2013-08-11 
21:21:56 UTC (rev 28501)
@@ -219,7 +219,7 @@
   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);
@@ -282,7 +282,7 @@
 
   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, 
@@ -293,7 +293,7 @@
   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, 
@@ -303,7 +303,7 @@
   /* 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, 

Modified: gnunet/src/namestore/test_namestore_api_put.c
===================================================================
--- gnunet/src/namestore/test_namestore_api_put.c       2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/namestore/test_namestore_api_put.c       2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -121,7 +121,7 @@
   rd = GNUNET_malloc (count * sizeof (struct GNUNET_NAMESTORE_RecordData));
   for (c = 0; c < count; c++)
   {
-    rd[c].expiration_time = GNUNET_TIME_absolute_get().abs_value;
+    rd[c].expiration_time = GNUNET_TIME_absolute_get().abs_value_us;
     rd[c].record_type = TEST_RECORD_TYPE;
     rd[c].data_size = TEST_RECORD_DATALEN;
     rd[c].data = GNUNET_malloc(TEST_RECORD_DATALEN);
@@ -157,7 +157,7 @@
   /* create record */
   s_name = GNUNET_NAMESTORE_normalize_string ("DUMMY.dummy.gnunet");
   s_rd = create_record (RECORDS);
-  et.abs_value = s_rd[0].expiration_time;
+  et.abs_value_us = s_rd[0].expiration_time;
   signature = GNUNET_NAMESTORE_create_signature(privkey, et, s_name, s_rd, 
RECORDS);
   GNUNET_break (s_rd != NULL);
   GNUNET_break (s_name != NULL);

Modified: gnunet/src/namestore/test_namestore_api_remove.c
===================================================================
--- gnunet/src/namestore/test_namestore_api_remove.c    2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/namestore/test_namestore_api_remove.c    2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -203,14 +203,14 @@
   struct GNUNET_NAMESTORE_RecordData * rd;
 
   rd = GNUNET_malloc (count * sizeof (struct GNUNET_NAMESTORE_RecordData));
-  rd[0].expiration_time = GNUNET_TIME_relative_to_absolute 
(GNUNET_TIME_UNIT_HOURS).abs_value;
+  rd[0].expiration_time = GNUNET_TIME_relative_to_absolute 
(GNUNET_TIME_UNIT_HOURS).abs_value_us;
   rd[0].record_type = 0;
   rd[0].data_size = TEST_REMOVE_RECORD_DATALEN;
   rd[0].data = GNUNET_malloc(TEST_REMOVE_RECORD_DATALEN);
   memset ((char *) rd[0].data, TEST_RECORD_DATA, TEST_RECORD_DATALEN);
   for (c = 1; 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 = TEST_RECORD_TYPE;
     rd[c].data_size = TEST_RECORD_DATALEN;
     rd[c].data = GNUNET_malloc(TEST_RECORD_DATALEN);
@@ -250,7 +250,7 @@
   GNUNET_NAMESTORE_records_serialize(RECORDS, s_rd, rd_ser_len, rd_ser);
 
   /* sign */
-  et.abs_value = s_rd[0].expiration_time;
+  et.abs_value_us = s_rd[0].expiration_time;
   s_signature = GNUNET_NAMESTORE_create_signature(privkey, et, s_name, s_rd, 
RECORDS);
 
   /* create random zone hash */

Modified: gnunet/src/namestore/test_namestore_api_remove_not_existing_record.c
===================================================================
--- gnunet/src/namestore/test_namestore_api_remove_not_existing_record.c        
2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/namestore/test_namestore_api_remove_not_existing_record.c        
2013-08-11 21:21:56 UTC (rev 28501)
@@ -158,7 +158,7 @@
   rd = GNUNET_malloc (count * sizeof (struct GNUNET_NAMESTORE_RecordData));
   for (c = 0; c < count; c++)
   {
-    rd[c].expiration_time = GNUNET_TIME_absolute_get().abs_value;
+    rd[c].expiration_time = GNUNET_TIME_absolute_get().abs_value_us;
     rd[c].record_type = TEST_RECORD_TYPE;
     rd[c].data_size = TEST_RECORD_DATALEN;
     rd[c].data = GNUNET_malloc(TEST_RECORD_DATALEN);
@@ -198,7 +198,7 @@
   GNUNET_NAMESTORE_records_serialize(RECORDS, s_rd, rd_ser_len, rd_ser);
 
   /* sign */
-  et.abs_value = s_rd[0].expiration_time;
+  et.abs_value_us = s_rd[0].expiration_time;
   s_signature = GNUNET_NAMESTORE_create_signature(privkey, et, s_name, s_rd, 
RECORDS);
 
   /* create random zone hash */

Modified: gnunet/src/namestore/test_namestore_api_sign_verify.c
===================================================================
--- gnunet/src/namestore/test_namestore_api_sign_verify.c       2013-08-11 
20:40:36 UTC (rev 28500)
+++ gnunet/src/namestore/test_namestore_api_sign_verify.c       2013-08-11 
21:21:56 UTC (rev 28501)
@@ -62,7 +62,7 @@
   rd = GNUNET_malloc (count * sizeof (struct GNUNET_NAMESTORE_RecordData));
   for (c = 0; c < count; c++)
   {
-    rd[c].expiration_time = GNUNET_TIME_absolute_get().abs_value;
+    rd[c].expiration_time = GNUNET_TIME_absolute_get().abs_value_us;
     rd[c].record_type = TEST_RECORD_TYPE;
     rd[c].data_size = TEST_RECORD_DATALEN;
     rd[c].data = GNUNET_malloc(TEST_RECORD_DATALEN);

Modified: gnunet/src/namestore/test_namestore_api_zone_iteration.c
===================================================================
--- gnunet/src/namestore/test_namestore_api_zone_iteration.c    2013-08-11 
20:40:36 UTC (rev 28500)
+++ gnunet/src/namestore/test_namestore_api_zone_iteration.c    2013-08-11 
21:21:56 UTC (rev 28501)
@@ -195,7 +195,9 @@
     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 @@
     {
       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 @@
   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 @@
 
   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 @@
   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 @@
   /* 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);
 }

Modified: gnunet/src/namestore/test_namestore_api_zone_iteration_specific_zone.c
===================================================================
--- gnunet/src/namestore/test_namestore_api_zone_iteration_specific_zone.c      
2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/namestore/test_namestore_api_zone_iteration_specific_zone.c      
2013-08-11 21:21:56 UTC (rev 28501)
@@ -302,7 +302,7 @@
   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);
@@ -344,7 +344,7 @@
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Created record 1\n");
   GNUNET_asprintf(&s_name_1, "dummy1");
   s_rd_1 = create_record(1);
-  et.abs_value = s_rd_1[0].expiration_time;
+  et.abs_value_us = s_rd_1[0].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, 
@@ -353,7 +353,7 @@
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Created record 2 \n");
   GNUNET_asprintf(&s_name_2, "dummy2");
   s_rd_2 = create_record(1);
-  et.abs_value = s_rd_2[0].expiration_time;
+  et.abs_value_us = s_rd_2[0].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, 
@@ -363,7 +363,7 @@
   /* name in different zone */
   GNUNET_asprintf(&s_name_3, "dummy3");
   s_rd_3 = create_record(1);
-  et.abs_value = s_rd_3[0].expiration_time;
+  et.abs_value_us = s_rd_3[0].expiration_time;
   sig_3 = GNUNET_NAMESTORE_create_signature(privkey, 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);

Modified: gnunet/src/namestore/test_namestore_api_zone_iteration_stop.c
===================================================================
--- gnunet/src/namestore/test_namestore_api_zone_iteration_stop.c       
2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/namestore/test_namestore_api_zone_iteration_stop.c       
2013-08-11 21:21:56 UTC (rev 28501)
@@ -361,7 +361,7 @@
   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);
@@ -405,7 +405,7 @@
 
   GNUNET_asprintf(&s_name_1, "dummy1");
   s_rd_1 = create_record(1);
-  et.abs_value = s_rd_1[0].expiration_time;
+  et.abs_value_us = s_rd_1[0].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, &put_cont, NULL);
@@ -415,7 +415,7 @@
   GNUNET_asprintf(&s_name_2, "dummy2");
   s_rd_2 = create_record(1);
 
-  et.abs_value = s_rd_2[0].expiration_time;
+  et.abs_value_us = s_rd_2[0].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, &put_cont, NULL);
@@ -424,7 +424,7 @@
   /* name in different zone */
   GNUNET_asprintf(&s_name_3, "dummy3");
   s_rd_3 = create_record(1);
-  et.abs_value = s_rd_3[0].expiration_time;
+  et.abs_value_us = s_rd_3[0].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);
 }

Modified: gnunet/src/namestore/test_namestore_api_zone_to_name.c
===================================================================
--- gnunet/src/namestore/test_namestore_api_zone_to_name.c      2013-08-11 
20:40:36 UTC (rev 28500)
+++ gnunet/src/namestore/test_namestore_api_zone_to_name.c      2013-08-11 
21:21:56 UTC (rev 28501)
@@ -187,7 +187,7 @@
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using PKEY `%s' \n", 
GNUNET_NAMESTORE_short_h2s (&s_zone_value));
 
   struct GNUNET_NAMESTORE_RecordData rd;
-  rd.expiration_time = GNUNET_TIME_absolute_get().abs_value;
+  rd.expiration_time = GNUNET_TIME_absolute_get().abs_value_us;
   rd.record_type = GNUNET_NAMESTORE_TYPE_PKEY;
   rd.data_size = sizeof (struct GNUNET_CRYPTO_ShortHashCode);
   rd.data = GNUNET_malloc(sizeof (struct GNUNET_CRYPTO_ShortHashCode));
@@ -196,7 +196,7 @@
   GNUNET_break (NULL != nsh);
 
   expire = GNUNET_TIME_absolute_get ();
-  et.abs_value = rd.expiration_time;
+  et.abs_value_us = rd.expiration_time;
   s_signature = GNUNET_NAMESTORE_create_signature(privkey, et, s_name, &rd, 1);
   GNUNET_NAMESTORE_record_put(nsh, &pubkey, s_name, expire, 1, &rd, 
s_signature, put_cont, NULL);
 

Modified: gnunet/src/namestore/test_plugin_namestore.c
===================================================================
--- gnunet/src/namestore/test_plugin_namestore.c        2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/namestore/test_plugin_namestore.c        2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -154,7 +154,7 @@
   {
     rd[i].data = "Hello World";
     rd[i].data_size = id % 10;
-    rd[i].expiration_time = GNUNET_TIME_relative_to_absolute 
(GNUNET_TIME_UNIT_MINUTES).abs_value;
+    rd[i].expiration_time = GNUNET_TIME_relative_to_absolute 
(GNUNET_TIME_UNIT_MINUTES).abs_value_us;
     rd[i].record_type = 1 + (id % 13);
     rd[i].flags = (id  % 7);    
   }

Modified: gnunet/src/nse/gnunet-nse-profiler.c
===================================================================
--- gnunet/src/nse/gnunet-nse-profiler.c        2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/nse/gnunet-nse-profiler.c        2013-08-11 21:21:56 UTC (rev 
28501)
@@ -366,7 +366,7 @@
                          sizeof (output_buffer),
                          "%p %llu %llu %f %f %f\n",
                          peer, peers_running,
-                         timestamp.abs_value,
+                         (unsigned long long) timestamp.abs_value_us,
                          GNUNET_NSE_log_estimate_to_n (estimate), estimate,
                          std_dev);
   if (size != GNUNET_DISK_file_write (output_file, output_buffer, size))
@@ -435,7 +435,8 @@
   if (0 != flag)
     flag = 1;
   size = GNUNET_asprintf (&output_buffer, "%llu %llu %u\n",
-                          now.abs_value/1000, value, flag);
+                          now.abs_value_us / 1000LL / 1000LL, 
+                         value, flag);
   if (size != GNUNET_DISK_file_write (data_file, output_buffer, size))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Unable to write to file!\n");

Modified: gnunet/src/nse/gnunet-service-nse.c
===================================================================
--- gnunet/src/nse/gnunet-service-nse.c 2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/nse/gnunet-service-nse.c 2013-08-11 21:21:56 UTC (rev 28501)
@@ -440,8 +440,8 @@
   // f is frequency (gnunet_nse_interval)
   // x is matching_bits
   // p' is current_size_estimate
-  return ((double) gnunet_nse_interval.rel_value / (double) 2.0) -
-      ((gnunet_nse_interval.rel_value / M_PI) *
+  return ((double) gnunet_nse_interval.rel_value_us / (double) 2.0) -
+      ((gnunet_nse_interval.rel_value_us / M_PI) *
        atan (matching_bits - current_size_estimate));
 }
 
@@ -462,10 +462,12 @@
 
   d = get_matching_bits_delay (matching_bits);
   i = (uint32_t) (d / (double) (hop_count_max + 1));
+  ret.rel_value_us = i;
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-             "Randomizing flood using latencies up to %u ms\n",
-             (unsigned int) i);
-  ret.rel_value = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, i + 1);
+             "Randomizing flood using latencies up to %s\n",
+             GNUNET_STRINGS_relative_time_to_string (ret,
+                                                     GNUNET_YES));
+  ret.rel_value_us = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, i + 
1);
   return ret;
 #else
   return GNUNET_TIME_UNIT_ZERO;
@@ -508,7 +510,7 @@
 {
   struct GNUNET_HashCode timestamp_hash;
 
-  GNUNET_CRYPTO_hash (&timestamp.abs_value, sizeof (timestamp.abs_value),
+  GNUNET_CRYPTO_hash (&timestamp.abs_value_us, sizeof (timestamp.abs_value_us),
                       &timestamp_hash);
   return GNUNET_CRYPTO_hash_matching_bits (&timestamp_hash, &id->hashPubKey);
 }
@@ -535,26 +537,27 @@
   case -1:
     /* previous round is randomized between 0 and 50 ms */
 #if USE_RANDOM_DELAYS
-    ret.rel_value = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK, 50);
+    ret.rel_value_us = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK, 
50);
 #else
     ret = GNUNET_TIME_UNIT_ZERO;
 #endif
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                "Transmitting previous round behind schedule in %llu ms\n",
-                (unsigned long long) ret.rel_value);
+                "Transmitting previous round behind schedule in %s\n",
+                GNUNET_STRINGS_relative_time_to_string (ret, GNUNET_YES));
     return ret;
   case 0:
     /* current round is based on best-known matching_bits */
     matching_bits =
         ntohl (size_estimate_messages[estimate_index].matching_bits);
     dist_delay = get_matching_bits_delay (matching_bits);
-    dist_delay += get_delay_randomization (matching_bits).rel_value;
-    ret.rel_value = (uint64_t) dist_delay;
+    dist_delay += get_delay_randomization (matching_bits).rel_value_us;
+    ret.rel_value_us = (uint64_t) dist_delay;
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                "For round %llu, delay for %u matching bits is %llu ms\n",
-                (unsigned long long) current_timestamp.abs_value,
+                "For round %s, delay for %u matching bits is %s\n",
+                GNUNET_STRINGS_absolute_time_to_string (current_timestamp),
                 (unsigned int) matching_bits,
-                (unsigned long long) ret.rel_value);
+                GNUNET_STRINGS_relative_time_to_string (ret,
+                                                       GNUNET_YES));
     /* now consider round start time and add delay to it */
     tgt = GNUNET_TIME_absolute_add (current_timestamp, ret);
     return GNUNET_TIME_absolute_get_remaining (tgt);
@@ -621,10 +624,8 @@
     return 0;
   }
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "In round %llu, sending to `%s' estimate with %u bits\n",
-              (unsigned long long)
-              GNUNET_TIME_absolute_ntoh (size_estimate_messages[idx].
-                                         timestamp).abs_value,
+              "In round s, sending to `%s' estimate with %u bits\n",
+              GNUNET_STRINGS_absolute_time_to_string 
(GNUNET_TIME_absolute_ntoh (size_estimate_messages[idx].timestamp)),
               GNUNET_i2s (&peer_entry->id),
               (unsigned int) ntohl 
(size_estimate_messages[idx].matching_bits));
   if (ntohl (size_estimate_messages[idx].hop_count) == 0)
@@ -778,7 +779,7 @@
   if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
     return;
   offset = GNUNET_TIME_absolute_get_remaining (next_timestamp);
-  if (0 != offset.rel_value)
+  if (0 != offset.rel_value_us)
   {
     /* somehow run early, delay more */
     flood_task =
@@ -791,8 +792,8 @@
   current_timestamp = next_timestamp;
   next_timestamp =
       GNUNET_TIME_absolute_add (current_timestamp, gnunet_nse_interval);
-  if ((current_timestamp.abs_value ==
-      GNUNET_TIME_absolute_ntoh (next_message.timestamp).abs_value) &&
+  if ((current_timestamp.abs_value_us ==
+      GNUNET_TIME_absolute_ntoh (next_message.timestamp).abs_value_us) &&
       (get_matching_bits (current_timestamp, &my_identity) <
       ntohl(next_message.matching_bits)))
   {
@@ -1038,7 +1039,7 @@
   {
     uint64_t t;
 
-    t = GNUNET_TIME_absolute_get().abs_value;
+    t = GNUNET_TIME_absolute_get().abs_value_us;
     GNUNET_TESTBED_LOGGER_write (lh, &t, sizeof (uint64_t));
   }
 #endif
@@ -1078,12 +1079,12 @@
 #endif
 
   ts = GNUNET_TIME_absolute_ntoh (incoming_flood->timestamp);
-  if (ts.abs_value == current_timestamp.abs_value)
+  if (ts.abs_value_us == current_timestamp.abs_value_us)
     idx = estimate_index;
-  else if (ts.abs_value ==
-           current_timestamp.abs_value - gnunet_nse_interval.rel_value)
+  else if (ts.abs_value_us ==
+           current_timestamp.abs_value_us - gnunet_nse_interval.rel_value_us)
     idx = (estimate_index + HISTORY_SIZE - 1) % HISTORY_SIZE;
-  else if (ts.abs_value == next_timestamp.abs_value)
+  else if (ts.abs_value_us == next_timestamp.abs_value_us)
   {
     if (matching_bits <= ntohl (next_message.matching_bits))
       return GNUNET_OK;         /* ignore, simply too early/late */
@@ -1359,9 +1360,9 @@
                  memcmp (&my_identity, identity,
                          sizeof (struct GNUNET_PeerIdentity)));
   now = GNUNET_TIME_absolute_get ();
-  current_timestamp.abs_value =
-      (now.abs_value / gnunet_nse_interval.rel_value) *
-      gnunet_nse_interval.rel_value;
+  current_timestamp.abs_value_us =
+      (now.abs_value_us / gnunet_nse_interval.rel_value_us) *
+      gnunet_nse_interval.rel_value_us;
   next_timestamp =
       GNUNET_TIME_absolute_add (current_timestamp, gnunet_nse_interval);
   estimate_index = HISTORY_SIZE - 1;
@@ -1369,8 +1370,8 @@
   if (GNUNET_YES == check_proof_of_work (&my_public_key, my_proof))
   {
     int idx = (estimate_index + HISTORY_SIZE - 1) % HISTORY_SIZE;
-    prev_time.abs_value =
-        current_timestamp.abs_value - gnunet_nse_interval.rel_value;
+    prev_time.abs_value_us =
+        current_timestamp.abs_value_us - gnunet_nse_interval.rel_value_us;
     setup_flood_message (idx, prev_time);
     setup_flood_message (estimate_index, current_timestamp);
     estimate_count++;

Modified: gnunet/src/nse/nse_api.c
===================================================================
--- gnunet/src/nse/nse_api.c    2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/nse/nse_api.c    2013-08-11 21:21:56 UTC (rev 28501)
@@ -24,14 +24,11 @@
  * @author Nathan Evans
  */
 #include "platform.h"
-#include "gnunet_client_lib.h"
 #include "gnunet_constants.h"
-#include "gnunet_container_lib.h"
 #include "gnunet_arm_service.h"
 #include "gnunet_hello_lib.h"
 #include "gnunet_protocols.h"
-#include "gnunet_server_lib.h"
-#include "gnunet_time_lib.h"
+#include "gnunet_util_lib.h"
 #include "gnunet_nse_service.h"
 #include "nse.h"
 
@@ -150,8 +147,9 @@
   }
 
   LOG (GNUNET_ERROR_TYPE_DEBUG,
-       "Scheduling task to reconnect to nse service in %llu ms.\n",
-       h->reconnect_delay.rel_value);
+       "Scheduling task to reconnect to nse service in %s.\n",
+       GNUNET_STRINGS_relative_time_to_string (h->reconnect_delay,
+                                              GNUNET_YES));
   h->reconnect_task =
       GNUNET_SCHEDULER_add_delayed (h->reconnect_delay, &reconnect, h);
   h->reconnect_delay = GNUNET_TIME_STD_BACKOFF (h->reconnect_delay);

Modified: gnunet/src/nse/perf_kdf.c
===================================================================
--- gnunet/src/nse/perf_kdf.c   2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/nse/perf_kdf.c   2013-08-11 21:21:56 UTC (rev 28501)
@@ -79,7 +79,7 @@
   GAUGER ("NSE", "Proof-of-work hashing",
           1024 / (1 +
                  GNUNET_TIME_absolute_get_duration
-                 (start).rel_value), "hashes/s");
+                 (start).rel_value_us / 1000LL), "hashes/ms");
   return 0;
 }
 

Modified: gnunet/src/peerinfo/gnunet-service-peerinfo.c
===================================================================
--- gnunet/src/peerinfo/gnunet-service-peerinfo.c       2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/peerinfo/gnunet-service-peerinfo.c       2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -209,7 +209,7 @@
 {
   const struct GNUNET_TIME_Absolute *now = cls;
 
-  if (now->abs_value > expiration.abs_value)
+  if (now->abs_value_us > expiration.abs_value_us)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_INFO,
                 _("Removing expired address of transport `%s'\n"),
@@ -728,7 +728,7 @@
   {
     mrg = GNUNET_HELLO_merge ((*dest), hello);
     delta = GNUNET_HELLO_equals (mrg, (*dest), GNUNET_TIME_absolute_get ());
-    if (delta.abs_value == GNUNET_TIME_UNIT_FOREVER_ABS.abs_value)
+    if (delta.abs_value_us == GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us)
     {
       /* no differences, just ignore the update */
        GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "No change in %s HELLO for `%s'\n",

Modified: gnunet/src/pt/test_gns_vpn.c
===================================================================
--- gnunet/src/pt/test_gns_vpn.c        2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/pt/test_gns_vpn.c        2013-08-11 21:21:56 UTC (rev 28501)
@@ -393,7 +393,7 @@
   }
 
   host_key = GNUNET_CRYPTO_ecc_key_create_from_file (zone_keyfile);
-  rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value;
+  rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us;
   GNUNET_asprintf (&rd_string, "6 %s %s", (char*)&peername, "www.gads.");
   GNUNET_assert (GNUNET_OK == GNUNET_NAMESTORE_string_to_value 
(GNUNET_GNS_RECORD_VPN,
                                                                rd_string,

Modified: gnunet/src/regex/gnunet-daemon-regexprofiler.c
===================================================================
--- gnunet/src/regex/gnunet-daemon-regexprofiler.c      2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/regex/gnunet-daemon-regexprofiler.c      2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -179,10 +179,10 @@
   }
 
   random_delay =
-    GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS,
+    GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MICROSECONDS,
                                    GNUNET_CRYPTO_random_u32 (
                                      GNUNET_CRYPTO_QUALITY_WEAK,
-                                     reannounce_period_max.rel_value));
+                                     reannounce_period_max.rel_value_us));
   reannounce_task = GNUNET_SCHEDULER_add_delayed (random_delay,
                                                   &reannounce_regex, cls);
 }

Modified: gnunet/src/regex/plugin_block_regex.c
===================================================================
--- gnunet/src/regex/plugin_block_regex.c       2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/regex/plugin_block_regex.c       2013-08-11 21:21:56 UTC (rev 
28501)
@@ -177,7 +177,7 @@
     GNUNET_break_op(0);
     return GNUNET_BLOCK_EVALUATION_RESULT_INVALID;
   }
-  if (0 == GNUNET_TIME_absolute_get_remaining (GNUNET_TIME_absolute_ntoh 
(rba->expiration_time)).rel_value)
+  if (0 == GNUNET_TIME_absolute_get_remaining (GNUNET_TIME_absolute_ntoh 
(rba->expiration_time)).rel_value_us)
   {
     /* technically invalid, but can happen without an error, so
        we're nice by reporting it as a 'duplicate' */

Modified: gnunet/src/sysmon/gnunet-service-sysmon.c
===================================================================
--- gnunet/src/sysmon/gnunet-service-sysmon.c   2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/sysmon/gnunet-service-sysmon.c   2013-08-11 21:21:56 UTC (rev 
28501)
@@ -277,7 +277,7 @@
        if (GNUNET_YES == first_run)
                        first_run = GNUNET_NO;
        else
-                       sp->num_val += sp->interval.rel_value / 1000;
+                       sp->num_val += sp->interval.rel_value_us / 1000LL / 
1000LL;
 
   put_property (sp);
 }
@@ -548,11 +548,13 @@
     }
   }
 
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Loaded property `%s': %s, %s, interval 
%llu\n",
-      (NULL != sp->desc) ? sp->desc: "<undefined>",
-      (t_continous == sp->type) ? "continious" : "static",
-      (v_numeric == sp->value_type) ? "numeric" : "string",
-      sp->interval.rel_value);
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 
+             "Loaded property `%s': %s, %s, interval %s\n",
+             (NULL != sp->desc) ? sp->desc: "<undefined>",
+             (t_continous == sp->type) ? "continious" : "static",
+             (v_numeric == sp->value_type) ? "numeric" : "string",
+             GNUNET_STRINGS_relative_time_to_string (sp->interval,
+                                                     GNUNET_YES));
 
   GNUNET_CONTAINER_DLL_insert (sp_head, sp_tail, sp);
 
@@ -615,7 +617,7 @@
   sp->desc = GNUNET_strdup ("GNUnet startup time");
   sp->type = t_static;
   sp->value_type = v_numeric;
-  sp->num_val = (uint64_t) GNUNET_TIME_absolute_get().abs_value;
+  sp->num_val = (uint64_t) GNUNET_TIME_absolute_get().abs_value_us;
   GNUNET_CONTAINER_DLL_insert (sp_head, sp_tail, sp);
 
 

Modified: gnunet/src/testbed/gnunet-service-testbed_cpustatus.c
===================================================================
--- gnunet/src/testbed/gnunet-service-testbed_cpustatus.c       2013-08-11 
20:40:36 UTC (rev 28500)
+++ gnunet/src/testbed/gnunet-service-testbed_cpustatus.c       2013-08-11 
21:21:56 UTC (rev 28501)
@@ -527,7 +527,7 @@
 
   age = GNUNET_TIME_absolute_get_duration (lastCall);
   if ( (agedCPULoad == -1)
-       || (age.rel_value > 500) )
+       || (age.rel_value_us > 500000) )
     {
       /* use smoothing, but do NOT update lastRet at frequencies higher
          than 500ms; this makes the smoothing (mostly) independent from
@@ -667,7 +667,7 @@
   nproc = 0;
 #endif
   now = GNUNET_TIME_absolute_get ();
-  nbs = GNUNET_asprintf (&str, "%llu %d %d %u %u\n", now.abs_value / 1000,
+  nbs = GNUNET_asprintf (&str, "%llu %d %d %u %u\n", now.abs_value_us / 1000LL 
/ 1000LL,
                          ld_cpu, ld_disk, mem_usage, nproc);
   if (0 < nbs) 
   {

Modified: gnunet/src/testbed/testbed_api_hosts.c
===================================================================
--- gnunet/src/testbed/testbed_api_hosts.c      2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/testbed/testbed_api_hosts.c      2013-08-11 21:21:56 UTC (rev 
28501)
@@ -1695,12 +1695,12 @@
   }
   GNUNET_assert (nvals >= h->num_parallel_connects);
   avg = GNUNET_TIME_relative_divide (avg, nvals);
-  GNUNET_assert (GNUNET_TIME_UNIT_FOREVER_REL.rel_value != avg.rel_value);
-  sd = GNUNET_TESTBED_SD_deviation_factor_ (h->poc_sd, (unsigned int) 
avg.rel_value);
+  GNUNET_assert (GNUNET_TIME_UNIT_FOREVER_REL.rel_value_us != 
avg.rel_value_us);
+  sd = GNUNET_TESTBED_SD_deviation_factor_ (h->poc_sd, (unsigned int) 
avg.rel_value_us);
   if ( (sd <= 5) ||
        (0 == GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK,
                                       h->num_parallel_connects)) )
-    GNUNET_TESTBED_SD_add_data_ (h->poc_sd, (unsigned int) avg.rel_value);
+    GNUNET_TESTBED_SD_add_data_ (h->poc_sd, (unsigned int) avg.rel_value_us);
   if (GNUNET_SYSERR == sd)
   {
     GNUNET_TESTBED_set_num_parallel_overlay_connects_ (h,
@@ -1798,7 +1798,7 @@
     return;
   slot = &h->tslots[index];
   slot->nvals++;
-  if (GNUNET_TIME_UNIT_ZERO.rel_value == slot->time.rel_value)
+  if (GNUNET_TIME_UNIT_ZERO.rel_value_us == slot->time.rel_value_us)
   {
     slot->time = time;
     h->tslots_filled++;

Modified: gnunet/src/topology/gnunet-daemon-topology.c
===================================================================
--- gnunet/src/topology/gnunet-daemon-topology.c        2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/topology/gnunet-daemon-topology.c        2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2007, 2008, 2009, 2010 Christian Grothoff (and other contributing 
authors)
+     (C) 2007-2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -362,7 +362,7 @@
     return;
   if (GNUNET_OK != is_connection_allowed (pos))
     return;
-  if (GNUNET_TIME_absolute_get_remaining (pos->greylisted_until).rel_value > 0)
+  if (GNUNET_TIME_absolute_get_remaining (pos->greylisted_until).rel_value_us 
> 0)
     return;
   if (GNUNET_YES == pos->is_friend)
     rem = GREYLIST_AFTER_ATTEMPT_FRIEND;
@@ -407,7 +407,7 @@
   if (GNUNET_YES == pos->is_connected)
     return;
   delay = GNUNET_TIME_absolute_get_remaining (next_connect_attempt);
-  if (delay.rel_value > 0)
+  if (delay.rel_value_us > 0)
   {
     pos->attempt_connect_task = GNUNET_SCHEDULER_add_delayed (delay,
                                                              
&do_attempt_connect,
@@ -450,7 +450,7 @@
 
   pos->greylist_clean_task = GNUNET_SCHEDULER_NO_TASK;
   rem = GNUNET_TIME_absolute_get_remaining (pos->greylisted_until);
-  if (rem.rel_value == 0)
+  if (0 == rem.rel_value_us)
   {
     schedule_attempt_connect (pos);
   }
@@ -580,7 +580,7 @@
   if (pos->hello == NULL)
     return GNUNET_YES;
   rst_time = GNUNET_TIME_absolute_get_remaining (pos->filter_expiration);
-  if (0 == rst_time.rel_value)
+  if (0 == rst_time.rel_value_us)
   {
     /* time to discard... */
     GNUNET_CONTAINER_bloomfilter_free (pos->filter);
@@ -631,7 +631,7 @@
     return;
   next_want = GNUNET_HELLO_size (fah.result->hello);
   delay = GNUNET_TIME_absolute_get_remaining (pl->next_hello_allowed);
-  if (delay.rel_value == 0)
+  if (0 == delay.rel_value_us)
   {
     /* now! */
     pl->hello_req =
@@ -708,7 +708,7 @@
   else
   {
     GNUNET_assert (GNUNET_NO == pos->is_connected);
-    pos->greylisted_until.abs_value = 0;        /* remove greylisting */
+    pos->greylisted_until.abs_value_us = 0;        /* remove greylisting */
   }
   pos->is_connected = GNUNET_YES;
   pos->connect_attempts = 0;    /* re-set back-off factor */
@@ -870,7 +870,7 @@
   else if (peer->hello != NULL)
   {
     dt = GNUNET_HELLO_equals (peer->hello, hello, GNUNET_TIME_absolute_get ());
-    if (dt.abs_value == GNUNET_TIME_UNIT_FOREVER_ABS.abs_value)
+    if (dt.abs_value_us == GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us)
       return;                   /* nothing new here */
   }
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -940,7 +940,7 @@
       if ((GNUNET_NO == pos->is_connected) && (GNUNET_NO == pos->is_friend) &&
           (0 ==
            GNUNET_TIME_absolute_get_remaining (pos->
-                                               greylisted_until).rel_value))
+                                               greylisted_until).rel_value_us))
         free_peer (NULL, &pos->pid.hashPubKey, pos);
     }
     return;
@@ -956,7 +956,7 @@
                 GNUNET_i2s (peer));
     return;
   }
-  if (GNUNET_TIME_absolute_get_remaining (pos->greylisted_until).rel_value > 0)
+  if (GNUNET_TIME_absolute_get_remaining (pos->greylisted_until).rel_value_us 
> 0)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Already tried peer `%s' recently\n",
                 GNUNET_i2s (peer));

Modified: gnunet/src/transport/gnunet-service-transport.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport.c     2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/transport/gnunet-service-transport.c     2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -286,8 +286,9 @@
   }
 end:
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "Allowing receive from peer %s to continue in %llu ms\n",
-              GNUNET_i2s (peer), (unsigned long long) ret.rel_value);
+              "Allowing receive from peer %s to continue in %s\n",
+              GNUNET_i2s (peer), 
+             GNUNET_STRINGS_relative_time_to_string (ret, GNUNET_YES));
   return ret;
 }
 

Modified: gnunet/src/transport/gnunet-service-transport_manipulation.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport_manipulation.c        
2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/transport/gnunet-service-transport_manipulation.c        
2013-08-11 21:21:56 UTC (rev 28501)
@@ -419,7 +419,7 @@
                        if (UINT32_MAX != find_metric(tmp, 
GNUNET_ATS_QUALITY_NET_DELAY, TM_SEND))
                        {
                                        /* We have a delay */
-                                       delay.rel_value = find_metric(tmp, 
GNUNET_ATS_QUALITY_NET_DELAY, TM_SEND);
+                                       delay.rel_value_us = find_metric (tmp, 
GNUNET_ATS_QUALITY_NET_DELAY, TM_SEND);
                                        dqe = GNUNET_malloc (sizeof (struct 
DelayQueueEntry) + msg_size);
                                        dqe->id = *target;
                                        dqe->tmp = tmp;
@@ -434,8 +434,9 @@
                                        if (GNUNET_SCHEDULER_NO_TASK == 
tmp->send_delay_task)
                                                tmp->send_delay_task 
=GNUNET_SCHEDULER_add_delayed (delay, &send_delayed, dqe);
                                        GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                                                       "Delaying %u byte 
message to peer `%s' with generic delay for %llu ms\n",
-                                                       msg_size, GNUNET_i2s 
(target), (long long unsigned int) delay.rel_value);
+                                                       "Delaying %u byte 
message to peer `%s' with generic delay for %ms\n",
+                                                       msg_size, GNUNET_i2s 
(target),
+                                                   
GNUNET_STRINGS_relative_time_to_string (delay, GNUNET_YES));
                                        return;
                        }
        }
@@ -443,7 +444,7 @@
        {
                        GNUNET_break (GNUNET_YES == 
GST_neighbours_test_connected(target));
                        /* We have a delay */
-                       delay.rel_value = find_metric (&man_handle.general, 
GNUNET_ATS_QUALITY_NET_DELAY, TM_SEND);
+                       delay.rel_value_us = find_metric (&man_handle.general, 
GNUNET_ATS_QUALITY_NET_DELAY, TM_SEND);
                        dqe = GNUNET_malloc (sizeof (struct DelayQueueEntry) + 
msg_size);
                        dqe->id = *target;
                        dqe->tmp = NULL;
@@ -460,8 +461,9 @@
                                generic_send_delay_task = 
GNUNET_SCHEDULER_add_delayed (delay, &send_delayed, dqe);
                        }
                        GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                                       "Delaying %u byte message to peer `%s' 
with peer specific delay for %llu ms\n",
-                                       msg_size, GNUNET_i2s (target), (long 
long unsigned int) delay.rel_value);
+                                   "Delaying %u byte message to peer `%s' with 
peer specific delay for %s\n",
+                                   msg_size, GNUNET_i2s (target),
+                                   GNUNET_STRINGS_relative_time_to_string 
(delay, GNUNET_YES));
                        return;
        }
 
@@ -540,28 +542,29 @@
        struct GNUNET_TIME_Relative m_delay;
 
        g_recv_delay = find_metric (&man_handle.general, 
GNUNET_ATS_QUALITY_NET_DELAY, TM_RECEIVE);
-       if ((g_recv_delay >= GNUNET_TIME_UNIT_ZERO.rel_value) && (UINT32_MAX != 
g_recv_delay))
-               m_delay.rel_value = g_recv_delay; /* Global delay */
+       if ((g_recv_delay >= GNUNET_TIME_UNIT_ZERO.rel_value_us) && (UINT32_MAX 
!= g_recv_delay))
+         m_delay.rel_value_us = g_recv_delay; /* Global delay */
        else
-               m_delay = GNUNET_TIME_UNIT_ZERO;
+         m_delay = GNUNET_TIME_UNIT_ZERO;
 
        if (NULL != (tmp = GNUNET_CONTAINER_multihashmap_get (man_handle.peers, 
&peer->hashPubKey)))
        {
-                       /* Manipulate receive delay */
-                       p_recv_delay = find_metric (tmp, 
GNUNET_ATS_QUALITY_NET_DELAY, TM_RECEIVE);
-                       if (UINT32_MAX != p_recv_delay)
-                                       m_delay.rel_value = p_recv_delay; /* 
Peer specific delay */
+         /* Manipulate receive delay */
+         p_recv_delay = find_metric (tmp, GNUNET_ATS_QUALITY_NET_DELAY, 
TM_RECEIVE);
+         if (UINT32_MAX != p_recv_delay)
+           m_delay.rel_value_us = p_recv_delay; /* Peer specific delay */
        }
 
        quota_delay = GST_receive_callback (cls, peer, message,
                        session, sender_address, sender_address_len);
 
-       if (quota_delay.rel_value > m_delay.rel_value)
+       if (quota_delay.rel_value_us > m_delay.rel_value_us)
                m_delay = quota_delay;
 
        GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                       "Delaying next receive for peer `%s' for %llu ms\n",
-                       GNUNET_i2s (peer), (long long unsigned int) 
m_delay.rel_value);
+                   "Delaying next receive for peer `%s' for %s\n",
+                   GNUNET_i2s (peer),
+                   GNUNET_STRINGS_relative_time_to_string (m_delay, 
GNUNET_YES));
        return m_delay;
 
 }

Modified: gnunet/src/transport/gnunet-service-transport_neighbours.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport_neighbours.c  2013-08-11 
20:40:36 UTC (rev 28500)
+++ gnunet/src/transport/gnunet-service-transport_neighbours.c  2013-08-11 
21:21:56 UTC (rev 28501)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2010,2011,2012 Christian Grothoff (and other contributing authors)
+     (C) 2010-2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -155,7 +155,7 @@
       next = GNUNET_TIME_UNIT_ZERO_ABS;
       start = GNUNET_NO;
   }
-  if (0 == (rem = GNUNET_TIME_absolute_get_remaining(next)).rel_value)
+  if (0 == (rem = GNUNET_TIME_absolute_get_remaining(next)).rel_value_us)
   {
       fprintf (stderr, "Allocated in `%s' total: %5u bytes\n", __FILE__, 
bytes_alloced);
       while (NULL != cur)
@@ -1406,7 +1406,7 @@
   while (NULL != (mq = n->messages_head))
   {
     timeout = GNUNET_TIME_absolute_get_remaining (mq->timeout);
-    if (timeout.rel_value > 0)
+    if (timeout.rel_value_us > 0)
       break;
     GNUNET_STATISTICS_update (GST_stats,
                              gettext_noop
@@ -1443,7 +1443,7 @@
   GNUNET_assert ((S_CONNECTED == n->state) ||
                  (S_CONNECTED_SWITCHING_BLACKLIST == n->state) ||
                  (S_CONNECTED_SWITCHING_CONNECT_SENT));
-  if (GNUNET_TIME_absolute_get_remaining (n->keep_alive_time).rel_value > 0)
+  if (GNUNET_TIME_absolute_get_remaining (n->keep_alive_time).rel_value_us > 0)
     return; /* no keepalive needed at this time */
   m.size = htons (sizeof (struct GNUNET_MessageHeader));
   m.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_KEEPALIVE);
@@ -1534,14 +1534,16 @@
   n->latency = GNUNET_TIME_absolute_get_duration (n->last_keep_alive_time);
   n->timeout = GNUNET_TIME_relative_to_absolute 
(GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT);
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-             "Latency for peer `%s' is %llu ms\n",
-              GNUNET_i2s (&n->id), n->latency.rel_value);
+             "Latency for peer `%s' is %s\n",
+              GNUNET_i2s (&n->id), 
+             GNUNET_STRINGS_relative_time_to_string (n->latency,
+                                                     GNUNET_YES));
   /* append latency */
   ats.type = htonl (GNUNET_ATS_QUALITY_NET_DELAY);
-  if (n->latency.rel_value > UINT32_MAX)
+  if (n->latency.rel_value_us > UINT32_MAX)
     latency = UINT32_MAX;
   else
-    latency = n->latency.rel_value;
+    latency = n->latency.rel_value_us;
   ats.value = htonl (latency);
   GST_ats_update_metrics (&n->id,
                                                                                
          n->primary_address.address,
@@ -1622,17 +1624,18 @@
   }
   *do_forward = GNUNET_YES;
   ret = GNUNET_BANDWIDTH_tracker_get_delay (&n->in_tracker, 32 * 1024);
-  if (ret.rel_value > 0)
+  if (ret.rel_value_us > 0)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                "Throttling read (%llu bytes excess at %u b/s), waiting %llu 
ms before reading more.\n",
+                "Throttling read (%llu bytes excess at %u b/s), waiting %s 
before reading more.\n",
                 (unsigned long long) n->in_tracker.
                 consumption_since_last_update__,
                 (unsigned int) n->in_tracker.available_bytes_per_s__,
-                (unsigned long long) ret.rel_value);
+                GNUNET_STRINGS_relative_time_to_string (ret, GNUNET_YES));
     GNUNET_STATISTICS_update (GST_stats,
                               gettext_noop ("# ms throttling suggested"),
-                              (int64_t) ret.rel_value, GNUNET_NO);
+                              (int64_t) ret.rel_value_us / 1000LL, 
+                             GNUNET_NO);
   }
   return ret;
 }
@@ -2526,10 +2529,11 @@
   n->task = GNUNET_SCHEDULER_NO_TASK;
   delay = GNUNET_TIME_absolute_get_remaining (n->timeout);  
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-             "Master task runs for neighbour `%s' in state %s with timeout in 
%llu ms\n",
+             "Master task runs for neighbour `%s' in state %s with timeout in 
%s\n",
              GNUNET_i2s (&n->id),
              print_state(n->state),
-             (unsigned long long) delay.rel_value);
+             GNUNET_STRINGS_relative_time_to_string (delay,
+                                                     GNUNET_YES));
   switch (n->state)
   {
   case S_NOT_CONNECTED:
@@ -2539,7 +2543,7 @@
     free_neighbour (n, GNUNET_NO);
     return;
   case S_INIT_ATS:
-    if (0 == delay.rel_value)
+    if (0 == delay.rel_value_us)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                  "Connection to `%s' timed out waiting for ATS to provide 
address\n",
@@ -2550,7 +2554,7 @@
     }
     break;
   case S_INIT_BLACKLIST:
-    if (0 == delay.rel_value)
+    if (0 == delay.rel_value_us)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                  "Connection to `%s' timed out waiting for BLACKLIST to 
approve address\n",
@@ -2561,7 +2565,7 @@
     }
     break;
   case S_CONNECT_SENT:
-    if (0 == delay.rel_value)
+    if (0 == delay.rel_value_us)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                  "Connection to `%s' timed out waiting for other peer to send 
CONNECT_ACK\n",
@@ -2571,7 +2575,7 @@
     }
     break;
   case S_CONNECT_RECV_BLACKLIST_INBOUND:
-    if (0 == delay.rel_value)
+    if (0 == delay.rel_value_us)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                   "Connection to `%s' timed out waiting BLACKLIST to approve 
address to use for received CONNECT\n",
@@ -2582,7 +2586,7 @@
     }
     break;
   case S_CONNECT_RECV_ATS:
-    if (0 == delay.rel_value)
+    if (0 == delay.rel_value_us)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                  "Connection to `%s' timed out waiting ATS to provide address 
to use for CONNECT_ACK\n",
@@ -2593,7 +2597,7 @@
     }
     break;
   case S_CONNECT_RECV_BLACKLIST:
-    if (0 == delay.rel_value)
+    if (0 == delay.rel_value_us)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                  "Connection to `%s' timed out waiting BLACKLIST to approve 
address to use for CONNECT_ACK\n",
@@ -2604,7 +2608,7 @@
     }
     break;
   case S_CONNECT_RECV_ACK:
-    if (0 == delay.rel_value)
+    if (0 == delay.rel_value_us)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                  "Connection to `%s' timed out waiting for other peer to send 
SESSION_ACK\n",
@@ -2614,7 +2618,7 @@
     }
     break;
   case S_CONNECTED:
-    if (0 == delay.rel_value)
+    if (0 == delay.rel_value_us)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                  "Connection to `%s' timed out, missing KEEPALIVE_RESPONSEs\n",
@@ -2626,7 +2630,7 @@
     send_keepalive (n);
     break;
   case S_RECONNECT_ATS:
-    if (0 == delay.rel_value)
+    if (0 == delay.rel_value_us)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                  "Connection to `%s' timed out, waiting for ATS replacement 
address\n",
@@ -2636,7 +2640,7 @@
     }
     break;
   case S_RECONNECT_BLACKLIST:
-    if (0 == delay.rel_value)
+    if (0 == delay.rel_value_us)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                  "Connection to `%s' timed out, waiting for BLACKLIST to 
approve replacement address\n",
@@ -2646,7 +2650,7 @@
     }
     break;
   case S_RECONNECT_SENT:
-    if (0 == delay.rel_value)
+    if (0 == delay.rel_value_us)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                  "Connection to `%s' timed out, waiting for other peer to 
CONNECT_ACK replacement address\n",
@@ -2656,7 +2660,7 @@
     }
     break;
   case S_CONNECTED_SWITCHING_BLACKLIST:
-    if (0 == delay.rel_value)
+    if (0 == delay.rel_value_us)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                  "Connection to `%s' timed out, missing KEEPALIVE_RESPONSEs\n",
@@ -2668,7 +2672,7 @@
     send_keepalive (n);
     break;
   case S_CONNECTED_SWITCHING_CONNECT_SENT:
-    if (0 == delay.rel_value)
+    if (0 == delay.rel_value_us)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                  "Connection to `%s' timed out, missing KEEPALIVE_RESPONSEs 
(after trying to CONNECT on alternative address)\n",
@@ -2785,7 +2789,7 @@
                               1, GNUNET_NO);
     break;    
   case S_CONNECT_SENT:
-    if (ts.abs_value != n->primary_address.connect_timestamp.abs_value)
+    if (ts.abs_value_us != n->primary_address.connect_timestamp.abs_value_us)
       break; /* ACK does not match our original CONNECT message */
     n->state = S_CONNECTED;
     n->timeout = GNUNET_TIME_relative_to_absolute 
(GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT);
@@ -3142,7 +3146,7 @@
   sdm = (const struct SessionDisconnectMessage *) msg;
   if (NULL == (n = lookup_neighbour (peer)))
     return;                     /* gone already */
-  if (GNUNET_TIME_absolute_ntoh (sdm->timestamp).abs_value <= 
n->connect_ack_timestamp.abs_value)
+  if (GNUNET_TIME_absolute_ntoh (sdm->timestamp).abs_value_us <= 
n->connect_ack_timestamp.abs_value_us)
   {
     GNUNET_STATISTICS_update (GST_stats,
                               gettext_noop

Modified: gnunet/src/transport/gnunet-service-transport_validation.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport_validation.c  2013-08-11 
20:40:36 UTC (rev 28500)
+++ gnunet/src/transport/gnunet-service-transport_validation.c  2013-08-11 
21:21:56 UTC (rev 28501)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2010,2011 Christian Grothoff (and other contributing authors)
+     (C) 2010-2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -444,7 +444,7 @@
   ve->timeout_task = GNUNET_SCHEDULER_NO_TASK;
   max = GNUNET_TIME_absolute_max (ve->valid_until, ve->revalidation_block);
   left = GNUNET_TIME_absolute_get_remaining (max);
-  if (left.rel_value > 0)
+  if (left.rel_value_us > 0)
   {
     /* should wait a bit longer */
     ve->timeout_task =
@@ -494,7 +494,7 @@
               GNUNET_i2s (pid), GST_plugins_a2s (ve->address), 
ve->address->transport_name);
 
   next = GNUNET_TIME_absolute_add (GNUNET_TIME_absolute_get(), 
validation_delay);
-  if (next.abs_value > validation_next.abs_value)
+  if (next.abs_value_us > validation_next.abs_value_us)
        validation_next = next; /* We're going to send a PING so delay next 
validation */
 
   slen = strlen (ve->address->transport_name) + 1;
@@ -607,15 +607,15 @@
   canonical_delay =
       (ve->in_use ==
        GNUNET_YES) ? CONNECTED_PING_FREQUENCY
-      : ((GNUNET_TIME_absolute_get_remaining (ve->valid_until).rel_value >
+      : ((GNUNET_TIME_absolute_get_remaining (ve->valid_until).rel_value_us >
           0) ? VALIDATED_PING_FREQUENCY : UNVALIDATED_PING_KEEPALIVE);
-  if (delay.rel_value > canonical_delay.rel_value * 2)
+  if (delay.rel_value_us > canonical_delay.rel_value_us * 2)
   {
     /* situation changed, recalculate delay */
     delay = canonical_delay;
     ve->revalidation_block = GNUNET_TIME_relative_to_absolute (delay);
   }
-  if (delay.rel_value > 0)
+  if (delay.rel_value_us > 0)
   {
     /* should wait a bit longer */
     ve->revalidation_task =
@@ -624,7 +624,7 @@
   }
   blocked_for = GNUNET_TIME_absolute_get_remaining(validation_next);
   if ((validations_running > validations_fast_start_threshold) &&
-               (blocked_for.rel_value > 0))
+               (blocked_for.rel_value_us > 0))
   {
     /* Validations are blocked, have to wait for blocked_for time */
     ve->revalidation_task =
@@ -636,24 +636,20 @@
   /* schedule next PINGing with some extra random delay to avoid synchronous 
re-validations */
   rdelay =
       GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK,
-                                canonical_delay.rel_value);
+                                canonical_delay.rel_value_us);
 
-  /* Debug code for mantis 0002726*/
-  if (GNUNET_TIME_UNIT_FOREVER_REL.rel_value ==
-      GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, 
rdelay).rel_value)
+  /* Debug code for mantis 0002726 */
+  if (GNUNET_TIME_UNIT_FOREVER_REL.rel_value_us ==
+      GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MICROSECONDS, 
rdelay).rel_value_us)
   {
-    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Revalidation interval for peer `%s' for is FOREVER (debug: 
rdelay: %llu, canonical delay %llu)\n",
-                GNUNET_i2s (&ve->pid),
-                (unsigned long long) delay.rel_value,
-                (unsigned long long) canonical_delay.rel_value);
+    GNUNET_break (0);
     delay = canonical_delay;
   }
   else
   {
-      delay = GNUNET_TIME_relative_add (canonical_delay,
-                                GNUNET_TIME_relative_multiply
-                                (GNUNET_TIME_UNIT_MILLISECONDS, rdelay));
+    delay = GNUNET_TIME_relative_add (canonical_delay,
+                                     GNUNET_TIME_relative_multiply
+                                     (GNUNET_TIME_UNIT_MICROSECONDS, rdelay));
   }
   /* End debug code for mantis 0002726*/
   ve->revalidation_task =
@@ -739,7 +735,7 @@
   struct GNUNET_ATS_Information ats;
   struct GNUNET_CRYPTO_EccPublicKey public_key;
 
-  if (GNUNET_TIME_absolute_get_remaining (expiration).rel_value == 0)
+  if (0 == GNUNET_TIME_absolute_get_remaining (expiration).rel_value_us)
     return GNUNET_OK;           /* expired */
   if ((GNUNET_OK != GNUNET_HELLO_get_id (hello, &pid)) ||
       (GNUNET_OK != GNUNET_HELLO_get_key (hello, &public_key)))
@@ -806,16 +802,18 @@
         * when doing to many validations in parallel:
         * if (running validations < (max_fds / 2))
         * - "fast start": run validation immediately
-        * - have delay of (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT.rel_value) 
/ (max_fds / 2)
+        * - have delay of 
(GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT.rel_value_us) / (max_fds / 2)
         *   (300 sec / ~150 == ~2 sec.) between two validations
         */
 
        validation_next = GNUNET_TIME_absolute_get();
-       validation_delay.rel_value = 
(GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT.rel_value) /  (max_fds / 2);
+       validation_delay.rel_value_us = 
(GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT.rel_value_us) / (max_fds / 2);
        validations_fast_start_threshold = (max_fds / 2);
        validations_running = 0;
-       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Validation uses a fast start 
threshold of %u connections and a delay between of %u ms\n ",
-                       validations_fast_start_threshold, 
validation_delay.rel_value);
+       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Validation uses a fast start 
threshold of %u connections and a delay between of %s\n ",
+                   validations_fast_start_threshold, 
+                   GNUNET_STRINGS_relative_time_to_string (validation_delay,
+                                                           GNUNET_YES));
   validation_map = GNUNET_CONTAINER_multihashmap_create (VALIDATION_MAP_SIZE,
                                                         GNUNET_NO);
   pnc = GNUNET_PEERINFO_notify (GST_cfg, GNUNET_YES, &process_peerinfo_hello, 
NULL);
@@ -1056,8 +1054,8 @@
     GNUNET_assert (NULL != addrend);
     memcpy (&((char *) &pong[1])[slen], addrend, alen);
   }
-  if (GNUNET_TIME_absolute_get_remaining (*sig_cache_exp).rel_value <
-      PONG_SIGNATURE_LIFETIME.rel_value / 4)
+  if (GNUNET_TIME_absolute_get_remaining (*sig_cache_exp).rel_value_us <
+      PONG_SIGNATURE_LIFETIME.rel_value_us / 4)
   {
     /* create / update cached sig */
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -1164,7 +1162,7 @@
   const struct ValidateAddressContext *vac = cls;
   struct ValidationEntry *ve;
 
-  if (GNUNET_TIME_absolute_get_remaining (expiration).rel_value == 0)
+  if (0 == GNUNET_TIME_absolute_get_remaining (expiration).rel_value_us)
     return GNUNET_OK;           /* expired */
   ve = find_validation_entry (&vac->public_key, address);
   if (GNUNET_SCHEDULER_NO_TASK == ve->revalidation_task)
@@ -1261,7 +1259,7 @@
     return;
   }
   if (GNUNET_TIME_absolute_get_remaining
-      (GNUNET_TIME_absolute_ntoh (pong->expiration)).rel_value == 0)
+      (GNUNET_TIME_absolute_ntoh (pong->expiration)).rel_value_us == 0)
   {
     GNUNET_STATISTICS_update (GST_stats,
                               gettext_noop
@@ -1272,7 +1270,7 @@
 
   sig_res = GNUNET_SYSERR;
   do_verify = GNUNET_YES;
-  if (0 != 
GNUNET_TIME_absolute_get_remaining(ve->pong_sig_valid_until).rel_value)
+  if (0 != 
GNUNET_TIME_absolute_get_remaining(ve->pong_sig_valid_until).rel_value_us)
   {
                /* We have a cached and valid signature for this peer,
                 * try to compare instead of verify */
@@ -1316,7 +1314,7 @@
   {
     struct GNUNET_ATS_Information ats[2];
     ats[0].type = htonl (GNUNET_ATS_QUALITY_NET_DELAY);
-    ats[0].value = htonl ((uint32_t) ve->latency.rel_value);
+    ats[0].value = htonl ((uint32_t) ve->latency.rel_value_us);
     ats[1].type = htonl (GNUNET_ATS_NETWORK_TYPE);
     ats[1].value = htonl ((uint32_t) ve->network);
     GNUNET_ATS_address_add (GST_ats, ve->address, NULL, ats, 2);

Modified: gnunet/src/transport/gnunet-transport.c
===================================================================
--- gnunet/src/transport/gnunet-transport.c     2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/transport/gnunet-transport.c     2013-08-11 21:21:56 UTC (rev 
28501)
@@ -264,14 +264,14 @@
   {
     duration = GNUNET_TIME_absolute_get_duration (start_time);
     FPRINTF (stdout, _("Transmitted %llu bytes/s (%llu bytes in %s)\n"),
-             1000 * traffic_sent / (1 + duration.rel_value), traffic_sent,
+             1000LL * 1000LL * traffic_sent / (1 + duration.rel_value_us), 
traffic_sent,
              GNUNET_STRINGS_relative_time_to_string (duration, GNUNET_YES));
   }
   if (benchmark_receive)
   {
     duration = GNUNET_TIME_absolute_get_duration (start_time);
     FPRINTF (stdout, _("Received %llu bytes/s (%llu bytes in %s)\n"),
-             1000 * traffic_received / (1 + duration.rel_value),
+             1000LL * 1000LL * traffic_received / (1 + duration.rel_value_us),
              traffic_received,
              GNUNET_STRINGS_relative_time_to_string (duration, GNUNET_YES));
   }

Modified: gnunet/src/transport/plugin_transport_bluetooth.c
===================================================================
--- gnunet/src/transport/plugin_transport_bluetooth.c   2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/transport/plugin_transport_bluetooth.c   2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -694,7 +694,7 @@
 
   session->timeout_task = GNUNET_SCHEDULER_NO_TASK;
   timeout = GNUNET_TIME_absolute_get_remaining (session->timeout);
-  if (0 == timeout.rel_value) 
+  if (0 == timeout.rel_value_us) 
   {
     free_session (session);
     return;
@@ -970,7 +970,7 @@
 
   endpoint->timeout_task = GNUNET_SCHEDULER_NO_TASK;
   timeout = GNUNET_TIME_absolute_get_remaining (endpoint->timeout);
-  if (0 == timeout.rel_value) 
+  if (0 == timeout.rel_value_us) 
   {
     free_macendpoint (endpoint);
     return;

Modified: gnunet/src/transport/plugin_transport_http.c
===================================================================
--- gnunet/src/transport/plugin_transport_http.c        2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/transport/plugin_transport_http.c        2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -1261,8 +1261,10 @@
 
   s->timeout_task = GNUNET_SCHEDULER_NO_TASK;
   GNUNET_log (TIMEOUT_LOG,
-              "Session %p was idle for %llu ms, disconnecting\n",
-              s, (unsigned long long) TIMEOUT.rel_value);
+              "Session %p was idle for %s, disconnecting\n",
+              s,
+             GNUNET_STRINGS_relative_time_to_string (TIMEOUT,
+                                                     GNUNET_YES));
 
   /* call session destroy function */
   if (s->inbound == GNUNET_NO)
@@ -1284,8 +1286,10 @@
                                                   &session_timeout,
                                                   s);
  GNUNET_log (TIMEOUT_LOG,
-             "Timeout for session %p set to %llu ms\n",
-             s,  (unsigned long long) TIMEOUT.rel_value);
+             "Timeout for session %p set to %s\n",
+             s,
+            GNUNET_STRINGS_relative_time_to_string (TIMEOUT,
+                                                    GNUNET_YES));
 }
 
 
@@ -1303,8 +1307,10 @@
                                                   &session_timeout,
                                                   s);
  GNUNET_log (TIMEOUT_LOG,
-             "Timeout rescheduled for session %p set to %llu ms\n",
-             s, (unsigned long long) TIMEOUT.rel_value);
+             "Timeout rescheduled for session %p set to %s\n",
+             s,
+            GNUNET_STRINGS_relative_time_to_String (TIMEOUT,
+                                                    GNUNET_YES));
 }
 
 

Modified: gnunet/src/transport/plugin_transport_http_client.c
===================================================================
--- gnunet/src/transport/plugin_transport_http_client.c 2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/transport/plugin_transport_http_client.c 2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -912,6 +912,7 @@
   struct GNUNET_TIME_Relative delay;
   struct GNUNET_ATS_Information atsi;
   char *stat_txt;
+
   if (GNUNET_YES != client_exist_session(p, s))
   {
     GNUNET_break (0);
@@ -940,14 +941,16 @@
   s->next_receive =
       GNUNET_TIME_absolute_add (GNUNET_TIME_absolute_get (), delay);
 
-  if (GNUNET_TIME_absolute_get ().abs_value < s->next_receive.abs_value)
+  if (GNUNET_TIME_absolute_get ().abs_value_us < s->next_receive.abs_value_us)
   {
-
     GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
-                     "Client: peer `%s' address `%s' next read delayed for 
%llu ms\n",
+                     "Client: peer `%s' address `%s' next read delayed for 
%s\n",
                      GNUNET_i2s (&s->target),
-                     http_common_plugin_address_to_string (NULL, 
s->plugin->protocol, s->addr, s->addrlen),
-                     delay);
+                     http_common_plugin_address_to_string (NULL,
+                                                          s->plugin->protocol, 
+                                                          s->addr, s->addrlen),
+                     GNUNET_STRINGS_relative_time_to_string (delay,
+                                                            GNUNET_YES));
   }
   client_reschedule_session_timeout (s);
   return GNUNET_OK;
@@ -993,14 +996,16 @@
                    s, s->client_get,
                    len, GNUNET_i2s (&s->target));
   now = GNUNET_TIME_absolute_get ();
-  if (now.abs_value < s->next_receive.abs_value)
+  if (now.abs_value_us < s->next_receive.abs_value_us)
   {
     struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get ();
     struct GNUNET_TIME_Relative delta =
         GNUNET_TIME_absolute_get_difference (now, s->next_receive);
     GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, s->plugin->name,
-                     "Session %p / connection %p: No inbound bandwidth 
available! Next read was delayed for %llu ms\n",
-                     s, s->client_get, delta.rel_value);
+                     "Session %p / connection %p: No inbound bandwidth 
available! Next read was delayed for %s\n",
+                     s, s->client_get, 
+                    GNUNET_STRINGS_relative_time_to_string (delta,
+                                                            GNUNET_YES));
     if (s->recv_wakeup_task != GNUNET_SCHEDULER_NO_TASK)
     {
       GNUNET_SCHEDULER_cancel (s->recv_wakeup_task);
@@ -1276,7 +1281,7 @@
   curl_easy_setopt (s->client_get, CURLOPT_TIMEOUT, 0);
   curl_easy_setopt (s->client_get, CURLOPT_PRIVATE, s);
   curl_easy_setopt (s->client_get, CURLOPT_CONNECTTIMEOUT_MS,
-                    (long) HTTP_CLIENT_NOT_VALIDATED_TIMEOUT.rel_value);
+                    (long) HTTP_CLIENT_NOT_VALIDATED_TIMEOUT.rel_value_us / 
1000LL);
   curl_easy_setopt (s->client_get, CURLOPT_BUFFERSIZE,
                     2 * GNUNET_SERVER_MAX_MESSAGE_SIZE);
 #if CURL_TCP_NODELAY
@@ -1353,7 +1358,7 @@
   curl_easy_setopt (s->client_put, CURLOPT_TIMEOUT, 0);
   curl_easy_setopt (s->client_put, CURLOPT_PRIVATE, s);
   curl_easy_setopt (s->client_put, CURLOPT_CONNECTTIMEOUT_MS,
-                    (long) HTTP_CLIENT_NOT_VALIDATED_TIMEOUT.rel_value);
+                    (long) HTTP_CLIENT_NOT_VALIDATED_TIMEOUT.rel_value_us / 
1000LL);
   curl_easy_setopt (s->client_put, CURLOPT_BUFFERSIZE,
                     2 * GNUNET_SERVER_MAX_MESSAGE_SIZE);
 #if CURL_TCP_NODELAY
@@ -1597,8 +1602,10 @@
 
   s->timeout_task = GNUNET_SCHEDULER_NO_TASK;
   GNUNET_log (TIMEOUT_LOG,
-              "Session %p was idle for %llu ms, disconnecting\n",
-              s, (unsigned long long) CLIENT_SESSION_TIMEOUT.rel_value);
+              "Session %p was idle for %s, disconnecting\n",
+              s,
+             GNUNET_STRINGS_relative_time_to_string (CLIENT_SESSION_TIMEOUT,
+                                                     GNUNET_YES));
 
   /* call session destroy function */
   GNUNET_assert (GNUNET_OK == client_disconnect (s));
@@ -1620,8 +1627,10 @@
                                                   &client_session_timeout,
                                                   s);
  GNUNET_log (TIMEOUT_LOG,
-             "Timeout for session %p set to %llu ms\n",
-             s,  (unsigned long long) CLIENT_SESSION_TIMEOUT.rel_value);
+             "Timeout for session %p set to %s\n",
+             s, 
+            GNUNET_STRINGS_relative_time_to_string (CLIENT_SESSION_TIMEOUT,
+                                                    GNUNET_YES));
 }
 
 
@@ -1642,8 +1651,10 @@
                                                   &client_session_timeout,
                                                   s);
  GNUNET_log (TIMEOUT_LOG,
-             "Timeout rescheduled for session %p set to %llu ms\n",
-             s, (unsigned long long) CLIENT_SESSION_TIMEOUT.rel_value);
+             "Timeout rescheduled for session %p set to %s\n",
+             s,
+            GNUNET_STRINGS_relative_time_to_string (CLIENT_SESSION_TIMEOUT,
+                                                    GNUNET_YES));
 }
 
 

Modified: gnunet/src/transport/plugin_transport_http_server.c
===================================================================
--- gnunet/src/transport/plugin_transport_http_server.c 2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/transport/plugin_transport_http_server.c 2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet
-     (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Christian Grothoff 
(and other contributing authors)
+     (C) 2002-2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -876,29 +876,42 @@
   return GNUNET_OK;
 }
 
+
+
+/**
+ * Tell MHD that the connection should timeout after #to seconds.
+ *
+ * @param plugin our plugin
+ * @param s session for which the timeout changes
+ * @param to timeout in seconds
+ */
 static void
-server_mhd_connection_timeout (struct HTTP_Server_Plugin *plugin, struct 
Session *s, int to)
+server_mhd_connection_timeout (struct HTTP_Server_Plugin *plugin, 
+                              struct Session *s,
+                              unsigned int to)
 {
 #if MHD_VERSION >= 0x00090E00
     /* Setting timeouts for other connections */
-    if (s->server_recv != NULL)
-    {
-      GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
-                       "Setting timeout for %p to %u sec.\n", s->server_recv, 
to);
-      MHD_set_connection_option (s->server_recv->mhd_conn,
-                                 MHD_CONNECTION_OPTION_TIMEOUT,
-                                 to);
-      server_reschedule (plugin, s->server_recv->mhd_daemon, GNUNET_NO);
-    }
-    if (s->server_send != NULL)
-    {
-      GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
-                       "Setting timeout for %p to %u sec.\n", s->server_send, 
to);
-      MHD_set_connection_option (s->server_send->mhd_conn,
-                                 MHD_CONNECTION_OPTION_TIMEOUT,
-                                 to);
-      server_reschedule (plugin, s->server_send->mhd_daemon, GNUNET_NO);
-    }
+  if (NULL != s->server_recv)
+  {
+    GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
+                    "Setting timeout for %p to %u sec.\n",
+                    s->server_recv, to);
+    MHD_set_connection_option (s->server_recv->mhd_conn,
+                              MHD_CONNECTION_OPTION_TIMEOUT,
+                              to);
+    server_reschedule (plugin, s->server_recv->mhd_daemon, GNUNET_NO);
+  }
+  if (NULL != s->server_send)
+  {
+    GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
+                    "Setting timeout for %p to %u sec.\n",
+                    s->server_send, to);
+    MHD_set_connection_option (s->server_send->mhd_conn,
+                              MHD_CONNECTION_OPTION_TIMEOUT,
+                              to);
+    server_reschedule (plugin, s->server_send->mhd_daemon, GNUNET_NO);
+  }
 #endif
 }
 
@@ -1034,14 +1047,12 @@
   struct ServerConnection *sc = NULL;
   const union MHD_ConnectionInfo *conn_info;
   struct GNUNET_ATS_Information ats;
-
   struct HttpAddress *addr;
   size_t addr_len;
-
   struct GNUNET_PeerIdentity target;
   uint32_t tag = 0;
   int direction = GNUNET_SYSERR;
-  int to;
+  unsigned int to;
 
   conn_info = MHD_get_connection_info (mhd_connection,
                                        MHD_CONNECTION_INFO_CLIENT_ADDRESS);
@@ -1169,8 +1180,9 @@
 #if MHD_VERSION >= 0x00090E00
   if ((NULL == s->server_recv) || (NULL == s->server_send))
   {
-    to = (HTTP_SERVER_NOT_VALIDATED_TIMEOUT.rel_value / 1000);
-    MHD_set_connection_option (mhd_connection, MHD_CONNECTION_OPTION_TIMEOUT, 
to);
+    to = (HTTP_SERVER_NOT_VALIDATED_TIMEOUT.rel_value_us / 1000LL / 1000LL);
+    MHD_set_connection_option (mhd_connection, 
+                              MHD_CONNECTION_OPTION_TIMEOUT, to);
     server_reschedule (plugin, sc->mhd_daemon, GNUNET_NO);
   }
   else
@@ -1178,7 +1190,7 @@
     GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
                      "Session %p for peer `%s' fully connected\n",
                      s, GNUNET_i2s (&target));
-    to = (SERVER_SESSION_TIMEOUT.rel_value / 1000);
+    to = (SERVER_SESSION_TIMEOUT.rel_value_us / 1000LL / 1000LL);
     server_mhd_connection_timeout (plugin, s, to);
   }
 
@@ -1325,13 +1337,14 @@
 
   s->session_passed = GNUNET_YES;
   s->next_receive = GNUNET_TIME_absolute_add (GNUNET_TIME_absolute_get (), 
delay);
-  if (delay.rel_value > 0)
+  if (delay.rel_value_us > 0)
   {
     GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
-                     "Peer `%s' address `%s' next read delayed for %llu ms\n",
+                     "Peer `%s' address `%s' next read delayed for %s\n",
                      GNUNET_i2s (&s->target),
                      http_common_plugin_address_to_string (NULL,  p->protocol, 
s->addr, s->addrlen),
-                     delay);
+                     GNUNET_STRINGS_relative_time_to_string (delay,
+                                                            GNUNET_YES));
   }
   server_reschedule_session_timeout (s);
   return GNUNET_OK;
@@ -1477,7 +1490,7 @@
                        *upload_data_size);
       struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get ();
 
-      if ((s->next_receive.abs_value <= now.abs_value))
+      if ((s->next_receive.abs_value_us <= now.abs_value_us))
       {
         GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
                          "PUT with %u bytes forwarded to MST\n",
@@ -1488,16 +1501,17 @@
         }
             GNUNET_SERVER_mst_receive (s->msg_tk, s, upload_data,
                                        *upload_data_size, GNUNET_NO, 
GNUNET_NO);
-#if MHD_VERSION >= 0x00090E00
-        server_mhd_connection_timeout (plugin, s, 
GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT.rel_value / 1000);
-#endif
+        server_mhd_connection_timeout (plugin, s,
+                                      
GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT.rel_value_us / 1000LL / 1000LL);
         (*upload_data_size) = 0;
       }
       else
       {
         GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                    "Session %p / Connection %p: no inbound bandwidth 
available! Next read was delayed by %llu ms\n",
-                    s, sc, now.abs_value - s->next_receive.abs_value);
+                    "Session %p / Connection %p: no inbound bandwidth 
available! Next read was delayed by %s\n",
+                    s, sc,
+                   GNUNET_STRINGS_relative_time_to_string 
(GNUNET_TIME_absolute_get_duration (s->next_receive),
+                                                           GNUNET_YES));
       }
       return MHD_YES;
     }
@@ -1753,12 +1767,12 @@
     {
 
       GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
-                       "SELECT Timeout changed from %llu to %llu\n",
+                       "SELECT Timeout changed from %llu to %llu (ms)\n",
                        last_timeout, timeout);
       last_timeout = timeout;
     }
-    if (timeout <= GNUNET_TIME_UNIT_SECONDS.rel_value)
-      tv.rel_value = (uint64_t) timeout;
+    if (timeout <= GNUNET_TIME_UNIT_SECONDS.rel_value_us / 1000LL)
+      tv.rel_value_us = (uint64_t) timeout * 1000LL;
     else
       tv = GNUNET_TIME_UNIT_SECONDS;
   }
@@ -2007,12 +2021,12 @@
 
 
 #if MHD_VERSION >= 0x00090E00
-  timeout = HTTP_SERVER_NOT_VALIDATED_TIMEOUT.rel_value / 1000;
+  timeout = HTTP_SERVER_NOT_VALIDATED_TIMEOUT.rel_value_us / 1000LL / 1000LL;
   GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
                    "MHD can set timeout per connection! Default time out %u 
sec.\n",
                    timeout);
 #else
-  timeout = SERVER_SESSION_TIMEOUT.rel_value / 1000;
+  timeout = SERVER_SESSION_TIMEOUT.rel_value_us / 1000LL / 1000LL;
   GNUNET_log_from (GNUNET_ERROR_TYPE_WARNING, plugin->name,
                    "MHD cannot set timeout per connection! Default time out %u 
sec.\n",
                    timeout);
@@ -2870,8 +2884,10 @@
 
   s->timeout_task = GNUNET_SCHEDULER_NO_TASK;
   GNUNET_log (TIMEOUT_LOG,
-              "Session %p was idle for %llu ms, disconnecting\n",
-              s, (unsigned long long) SERVER_SESSION_TIMEOUT.rel_value);
+              "Session %p was idle for %s, disconnecting\n",
+              s, 
+             GNUNET_STRINGS_relative_time_to_string (SERVER_SESSION_TIMEOUT,
+                                                     GNUNET_YES));
 
   /* call session destroy function */
  GNUNET_assert (GNUNET_OK == server_disconnect (s));
@@ -2892,8 +2908,10 @@
                                                   &server_session_timeout,
                                                   s);
  GNUNET_log (TIMEOUT_LOG,
-             "Timeout for session %p set to %llu ms\n",
-             s,  (unsigned long long) SERVER_SESSION_TIMEOUT.rel_value);
+             "Timeout for session %p set to %s\n",
+             s,
+            GNUNET_STRINGS_relative_time_to_string (SERVER_SESSION_TIMEOUT,
+                                                    GNUNET_YES));
 }
 
 
@@ -2913,8 +2931,10 @@
                                                   &server_session_timeout,
                                                   s);
  GNUNET_log (TIMEOUT_LOG,
-             "Timeout rescheduled for session %p set to %llu ms\n",
-             s, (unsigned long long) SERVER_SESSION_TIMEOUT.rel_value);
+             "Timeout rescheduled for session %p set to %s\n",
+             s,
+            GNUNET_STRINGS_relative_time_to_string (SERVER_SESSION_TIMEOUT,
+                                                    GNUNET_YES));
 }
 
 

Modified: gnunet/src/transport/plugin_transport_tcp.c
===================================================================
--- gnunet/src/transport/plugin_transport_tcp.c 2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/transport/plugin_transport_tcp.c 2013-08-11 21:21:56 UTC (rev 
28501)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet
-     (C) 2002--2012 Christian Grothoff (and other contributing authors)
+     (C) 2002--2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -897,7 +897,7 @@
     ret = 0;
     now = GNUNET_TIME_absolute_get ();
     while ((NULL != (pos = session->pending_messages_head)) &&
-           (pos->timeout.abs_value <= now.abs_value))
+           (pos->timeout.abs_value_us <= now.abs_value_us))
     {
       GNUNET_CONTAINER_DLL_remove (session->pending_messages_head,
                                    session->pending_messages_tail, pos);
@@ -2269,16 +2269,16 @@
 
   reschedule_session_timeout (session);
 
-  if (delay.rel_value == 0)
+  if (0 == delay.rel_value_us)
   {
     GNUNET_SERVER_receive_done (client, GNUNET_OK);
   }
   else
   {
     LOG (GNUNET_ERROR_TYPE_DEBUG, 
-        "Throttling receiving from `%s' for %llu ms\n",
+        "Throttling receiving from `%s' for %s\n",
         GNUNET_i2s (&session->target),
-        (unsigned long long) delay.rel_value);
+        GNUNET_STRINGS_relative_time_to_string (delay, GNUNET_YES));
     GNUNET_SERVER_disable_receive_done_warning (client);
     session->receive_delay_task =
         GNUNET_SCHEDULER_add_delayed (delay, &delayed_done, session);
@@ -2426,8 +2426,10 @@
 
   s->timeout_task = GNUNET_SCHEDULER_NO_TASK;
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-             "Session %p was idle for %llu ms, disconnecting\n",
-             s, (unsigned long long) 
GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT.rel_value);
+             "Session %p was idle for %s, disconnecting\n",
+             s,
+             GNUNET_STRINGS_relative_time_to_string 
(GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT,
+                                                     GNUNET_YES));
   /* call session destroy function */
   disconnect_session(s);
 }
@@ -2445,8 +2447,10 @@
                                                    &session_timeout,
                                                    s);
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-             "Timeout for session %p set to %llu ms\n",
-             s,  (unsigned long long) 
GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT.rel_value);
+             "Timeout for session %p set to %s\n",
+             s,  
+             GNUNET_STRINGS_relative_time_to_string 
(GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT,
+                                                     GNUNET_YES));
 }
 
 
@@ -2464,8 +2468,10 @@
                                                    &session_timeout,
                                                    s);
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "Timeout rescheduled for session %p set to %llu ms\n",
-             s, (unsigned long long) 
GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT.rel_value);
+              "Timeout rescheduled for session %p set to %s\n",
+             s, 
+             GNUNET_STRINGS_relative_time_to_string 
(GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT,
+                                                     GNUNET_YES));
 }
 
 
@@ -2483,7 +2489,7 @@
     s->timeout_task = GNUNET_SCHEDULER_NO_TASK;
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Timeout stopped for session %p canceled\n",
-                s, (unsigned long long) 
GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT.rel_value);
+                s);
   }
 }
 

Modified: gnunet/src/transport/plugin_transport_udp.c
===================================================================
--- gnunet/src/transport/plugin_transport_udp.c 2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/transport/plugin_transport_udp.c 2013-08-11 21:21:56 UTC (rev 
28501)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet
-     (C) 2010, 2011 Christian Grothoff (and other contributing authors)
+     (C) 2010-2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -509,9 +509,9 @@
      * - timeout minimum delay */
     plugin->select_task =
       GNUNET_SCHEDULER_add_select (GNUNET_SCHEDULER_PRIORITY_DEFAULT,
-                                  (0 == min_delay.rel_value) ? 
GNUNET_TIME_UNIT_FOREVER_REL : min_delay,
+                                  (0 == min_delay.rel_value_us) ? 
GNUNET_TIME_UNIT_FOREVER_REL : min_delay,
                                   plugin->rs_v4,
-                                  (0 == min_delay.rel_value) ? plugin->ws_v4 : 
NULL,
+                                  (0 == min_delay.rel_value_us) ? 
plugin->ws_v4 : NULL,
                                   &udp_plugin_select, plugin);  
   }
   if ((GNUNET_YES == plugin->enable_ipv6) && (NULL != plugin->sockv6))
@@ -525,9 +525,9 @@
       GNUNET_SCHEDULER_cancel(plugin->select_task_v6);
     plugin->select_task_v6 =
       GNUNET_SCHEDULER_add_select (GNUNET_SCHEDULER_PRIORITY_DEFAULT,
-                                  (0 == min_delay.rel_value) ? 
GNUNET_TIME_UNIT_FOREVER_REL : min_delay,
+                                  (0 == min_delay.rel_value_us) ? 
GNUNET_TIME_UNIT_FOREVER_REL : min_delay,
                                   plugin->rs_v6,
-                                  (0 == min_delay.rel_value) ? plugin->ws_v6 : 
NULL,
+                                  (0 == min_delay.rel_value_us) ? 
plugin->ws_v6 : NULL,
                                   &udp_plugin_select_v6, plugin);
   }
 }
@@ -1328,8 +1328,10 @@
 
   s->timeout_task = GNUNET_SCHEDULER_NO_TASK;
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "Session %p was idle for %llu ms, disconnecting\n",
-              s, (unsigned long long) 
GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT.rel_value);
+              "Session %p was idle for %s, disconnecting\n",
+              s,
+             GNUNET_STRINGS_relative_time_to_string 
(GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT,
+                                                     GNUNET_YES));
   /* call session destroy function */
   disconnect_session (s);
 }
@@ -1347,8 +1349,10 @@
                                                    &session_timeout,
                                                    s);
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "Timeout for session %p set to %llu ms\n",
-              s,  (unsigned long long) 
GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT.rel_value);
+              "Timeout for session %p set to %s\n",
+              s,
+             GNUNET_STRINGS_relative_time_to_string 
(GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT,
+                                                     GNUNET_YES));
 }
 
 
@@ -1366,8 +1370,10 @@
                                                    &session_timeout,
                                                    s);
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "Timeout rescheduled for session %p set to %llu ms\n",
-              s, (unsigned long long) 
GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT.rel_value);
+              "Timeout rescheduled for session %p set to %s\n",
+              s, 
+             GNUNET_STRINGS_relative_time_to_string 
(GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT,
+                                                     GNUNET_YES));
 }
 
 
@@ -1385,7 +1391,7 @@
     s->timeout_task = GNUNET_SCHEDULER_NO_TASK;
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Timeout stopped for session %p canceled\n",
-                s, (unsigned long long) 
GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT.rel_value);
+                s);
   }
 }
 
@@ -2173,16 +2179,17 @@
   if (NULL == s)
     return;
 
-  if (s->flow_delay_for_other_peer.rel_value <= UINT32_MAX)
-    delay = s->flow_delay_for_other_peer.rel_value;
+  if (s->flow_delay_for_other_peer.rel_value_us <= UINT32_MAX)
+    delay = s->flow_delay_for_other_peer.rel_value_us;
 
   LOG (GNUNET_ERROR_TYPE_DEBUG,
-       "Sending ACK to `%s' including delay of %u ms\n",
+       "Sending ACK to `%s' including delay of %s\n",
        GNUNET_a2s (rc->src_addr,
                    (rc->src_addr->sa_family ==
                     AF_INET) ? sizeof (struct sockaddr_in) : sizeof (struct
                                                                      
sockaddr_in6)),
-       delay);
+       GNUNET_STRINGS_relative_time_to_string (s->flow_delay_for_other_peer,
+                                              GNUNET_YES));
   udpw = GNUNET_malloc (sizeof (struct UDP_MessageWrapper) + msize);
   udpw->msg_size = msize;
   udpw->payload_size = 0;
@@ -2248,10 +2255,11 @@
     return;
   }
 
-  flow_delay.rel_value = (uint64_t) ntohl (udp_ack->delay);
+  flow_delay.rel_value_us = (uint64_t) ntohl (udp_ack->delay);
   LOG (GNUNET_ERROR_TYPE_DEBUG, 
-       "We received a sending delay of %llu\n",
-       flow_delay.rel_value);
+       "We received a sending delay of %s\n",
+       GNUNET_STRINGS_relative_time_to_string (flow_delay,
+                                              GNUNET_YES));
   s->flow_delay_from_other_peer =
       GNUNET_TIME_relative_to_absolute (flow_delay);
 
@@ -2324,7 +2332,7 @@
     d_ctx->hnode =
         GNUNET_CONTAINER_heap_insert (plugin->defrag_ctxs, d_ctx,
                                       (GNUNET_CONTAINER_HeapCostType)
-                                      now.abs_value);
+                                      now.abs_value_us);
     LOG (GNUNET_ERROR_TYPE_DEBUG, 
         "Created new defragmentation context for %u-byte fragment from `%s'\n",
         (unsigned int) ntohs (msg->size),
@@ -2343,7 +2351,7 @@
     /* keep this 'rc' from expiring */
     GNUNET_CONTAINER_heap_update_cost (plugin->defrag_ctxs, d_ctx->hnode,
                                        (GNUNET_CONTAINER_HeapCostType)
-                                       now.abs_value);
+                                       now.abs_value_us);
   }
   if (GNUNET_CONTAINER_heap_get_size (plugin->defrag_ctxs) >
       UDP_MAX_SENDER_ADDRESSES_WITH_DEFRAG)
@@ -2459,7 +2467,7 @@
   {
     /* Find messages with timeout */
     remaining = GNUNET_TIME_absolute_get_remaining (udpw->timeout);
-    if (GNUNET_TIME_UNIT_ZERO.rel_value == remaining.rel_value)
+    if (GNUNET_TIME_UNIT_ZERO.rel_value_us == remaining.rel_value_us)
     {
       /* Message timed out */
       switch (udpw->msg_type) {
@@ -2542,7 +2550,7 @@
     {
       /* Message did not time out, check flow delay */
       remaining = GNUNET_TIME_absolute_get_remaining 
(udpw->session->flow_delay_from_other_peer);
-      if (GNUNET_TIME_UNIT_ZERO.rel_value == remaining.rel_value)
+      if (GNUNET_TIME_UNIT_ZERO.rel_value_us == remaining.rel_value_us)
       {
         /* this message is not delayed */
         LOG (GNUNET_ERROR_TYPE_DEBUG, 
@@ -2554,8 +2562,10 @@
       {
         /* Message is delayed, try next */
         LOG (GNUNET_ERROR_TYPE_DEBUG,
-             "Message for peer `%s' (%u bytes) is delayed for %llu \n",
-             GNUNET_i2s(&udpw->session->target), udpw->payload_size, 
remaining.rel_value);
+             "Message for peer `%s' (%u bytes) is delayed for %s\n",
+             GNUNET_i2s(&udpw->session->target), udpw->payload_size, 
+            GNUNET_STRINGS_relative_time_to_string (remaining,
+                                                    GNUNET_YES));
         udpw = udpw->next;
       }
     }

Modified: gnunet/src/transport/plugin_transport_unix.c
===================================================================
--- gnunet/src/transport/plugin_transport_unix.c        2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/transport/plugin_transport_unix.c        2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -1080,7 +1080,7 @@
 
   while (NULL != (msgw = plugin->msg_tail))
   {
-    if (GNUNET_TIME_absolute_get_remaining (msgw->timeout).rel_value > 0)
+    if (GNUNET_TIME_absolute_get_remaining (msgw->timeout).rel_value_us > 0)
       break; /* Message is ready for sending */
     /* Message has a timeout */
     LOG (GNUNET_ERROR_TYPE_DEBUG,

Modified: gnunet/src/transport/plugin_transport_wlan.c
===================================================================
--- gnunet/src/transport/plugin_transport_wlan.c        2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/transport/plugin_transport_wlan.c        2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -692,7 +692,7 @@
 
   session->timeout_task = GNUNET_SCHEDULER_NO_TASK;
   timeout = GNUNET_TIME_absolute_get_remaining (session->timeout);
-  if (0 == timeout.rel_value) 
+  if (0 == timeout.rel_value_us) 
   {
     free_session (session);
     return;
@@ -1003,7 +1003,7 @@
 
   endpoint->timeout_task = GNUNET_SCHEDULER_NO_TASK;
   timeout = GNUNET_TIME_absolute_get_remaining (endpoint->timeout);
-  if (0 == timeout.rel_value) 
+  if (0 == timeout.rel_value_us) 
   {
     free_macendpoint (endpoint);
     return;

Modified: gnunet/src/transport/test_quota_compliance.c
===================================================================
--- gnunet/src/transport/test_quota_compliance.c        2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/transport/test_quota_compliance.c        2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -129,8 +129,8 @@
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n");
 
-  delta = GNUNET_TIME_absolute_get_duration (start_time).rel_value;
-  datarate = (total_bytes_sent * 1000) / delta;
+  delta = GNUNET_TIME_absolute_get_duration (start_time).rel_value_us;
+  datarate = (total_bytes_sent * 1000 * 1000) / delta;
 
   FPRINTF (stderr, "Throughput was %llu b/s\n", datarate);
 
@@ -398,7 +398,7 @@
   measure_task = GNUNET_SCHEDULER_NO_TASK;
 
   counter++;
-  if ((DURATION.rel_value / 1000) < counter)
+  if ((DURATION.rel_value_us / 1000 / 1000LL) < counter)
   {
     FPRINTF (stderr, "%s",  ".\n");
     GNUNET_SCHEDULER_add_now (&end, NULL);

Modified: gnunet/src/transport/test_transport_api_manipulation_cfg.c
===================================================================
--- gnunet/src/transport/test_transport_api_manipulation_cfg.c  2013-08-11 
20:40:36 UTC (rev 28500)
+++ gnunet/src/transport/test_transport_api_manipulation_cfg.c  2013-08-11 
21:21:56 UTC (rev 28501)
@@ -25,8 +25,8 @@
  * Peer 1 has inbound and outbound delay of 100ms
  * Peer 2 has no inbound and outbound delay
  *
- * We send a request from P1 to P2 and expect delay of >= TEST_DELAY ms
- * Then we send response from P2 to P1 and expect delay of >= TEST_DELAY ms
+ * We send a request from P1 to P2 and expect delay of >= TEST_DELAY us
+ * Then we send response from P2 to P1 and expect delay of >= TEST_DELAY us
  */
 #include "platform.h"
 #include "gnunet_transport_service.h"
@@ -48,7 +48,10 @@
 
 #define TEST_RESPONSE_MESSAGE_TYPE 12346
 
-#define TEST_DELAY 100
+/**
+ * Test delay, in microseconds.
+ */
+#define TEST_DELAY 100 * 1000LL
 
 static char *test_source;
 
@@ -304,16 +307,18 @@
                case TEST_REQUEST_MESSAGE_TYPE:
                        duration = 
GNUNET_TIME_absolute_get_difference(start_request,
                                        GNUNET_TIME_absolute_get());
-                       if (duration.rel_value >= TEST_DELAY)
+                       if (duration.rel_value_us >= TEST_DELAY)
                                GNUNET_log (GNUNET_ERROR_TYPE_INFO,
-                             "Request message was delayed for %llu ms\n",
-                                                               
duration.rel_value);
+                                           "Request message was delayed for 
%s\n",
+                                           
GNUNET_STRINGS_relative_time_to_string (duration,
+                                                                               
    GNUNET_YES));
                        else
-                       {
-                               GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                             "Request message was delayed for %llu ms, should 
be %u ms\n",
-                                                               
duration.rel_value, TEST_DELAY);
-                               ok = 1;
+                         {
+                           GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                                       "Request message was delayed for 
unexpected duration %s\n",
+                                       GNUNET_STRINGS_relative_time_to_string 
(duration,
+                                                                               
GNUNET_YES));
+                           ok = 1;
                        }
 
                  /* Send response */
@@ -323,15 +328,18 @@
                case TEST_RESPONSE_MESSAGE_TYPE:
                        duration = 
GNUNET_TIME_absolute_get_difference(start_response,
                                        GNUNET_TIME_absolute_get());
-                       if (duration.rel_value >= TEST_DELAY)
-                               GNUNET_log (GNUNET_ERROR_TYPE_INFO,
-                             "Response message was delayed for %llu ms\n", 
duration);
+                       if (duration.rel_value_us >= TEST_DELAY)
+                         GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+                                     "Response message was delayed for %s\n",
+                                     GNUNET_STRINGS_relative_time_to_string 
(duration,
+                                                                             
GNUNET_YES));
                        else
-                       {
-                               GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                             "Response message was delayed for %llu ms, should 
be %u ms\n",
-                                                               
duration.rel_value, TEST_DELAY);
-                               ok = 1;
+                         {
+                           GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                                       "Response message was delayed for 
unexpected duration %s\n",
+                                       GNUNET_STRINGS_relative_time_to_string 
(duration,
+                                                                               
GNUNET_YES));
+                           ok = 1;
                        }
                  /* Done */
                        ok = 0;

Modified: gnunet/src/transport/test_transport_api_manipulation_recv_tcp.c
===================================================================
--- gnunet/src/transport/test_transport_api_manipulation_recv_tcp.c     
2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/transport/test_transport_api_manipulation_recv_tcp.c     
2013-08-11 21:21:56 UTC (rev 28501)
@@ -200,13 +200,14 @@
        /* Received non-delayed message */
        dur_normal = GNUNET_TIME_absolute_get_duration(start_normal);
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                "Received non-delayed message %u after %llu\n",
+                "Received non-delayed message %u after %s\n",
                 messages_recv,
-                (long long unsigned int) dur_normal.rel_value);
+                GNUNET_STRINGS_relative_time_to_string (dur_normal,
+                                                       GNUNET_YES));
 
     struct GNUNET_ATS_Information ats[2];
        ats[0].type = htonl (GNUNET_ATS_QUALITY_NET_DELAY);
-       ats[0].value = htonl (1000);
+       ats[0].value = htonl (1000 * 1000LL);
        ats[1].type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE);
        ats[1].value = htonl (10);
 
@@ -218,16 +219,18 @@
        /* Received manipulated message */
        dur_delayed = GNUNET_TIME_absolute_get_duration(start_delayed);
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                  "Received delayed message %u after %llu\n",
+                  "Received delayed message %u after %s\n",
                   messages_recv,
-                  (long long unsigned int) dur_delayed.rel_value);
-      if (dur_delayed.rel_value < 1000)
+                 GNUNET_STRINGS_relative_time_to_string (dur_delayed,
+                                                         GNUNET_YES));
+      if (dur_delayed.rel_value_us < 1000 * 1000LL)
       {
-                               GNUNET_break (0);
-                               ok += 1;
+       GNUNET_break (0);
+       ok += 1;
         GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                    "Delayed message was not delayed correctly: took only 
%llu\n",
-                    (long long unsigned int) dur_delayed.rel_value);
+                    "Delayed message was not delayed correctly: took only 
%s\n",
+                   GNUNET_STRINGS_relative_time_to_string (dur_delayed,
+                                                           GNUNET_YES));
       }
       /* shutdown */
       end ();

Modified: gnunet/src/transport/test_transport_api_manipulation_send_tcp.c
===================================================================
--- gnunet/src/transport/test_transport_api_manipulation_send_tcp.c     
2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/transport/test_transport_api_manipulation_send_tcp.c     
2013-08-11 21:21:56 UTC (rev 28501)
@@ -200,9 +200,10 @@
        /* Received non-delayed message */
        dur_normal = GNUNET_TIME_absolute_get_duration(start_normal);
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                "Received non-delayed message %u after %llu\n",
+                "Received non-delayed message %u after %s\n",
                 messages_recv,
-                (long long unsigned int) dur_normal.rel_value);
+                GNUNET_STRINGS_relative_time_to_string (dur_normal,
+                                                       GNUNET_YES));
     send_task = GNUNET_SCHEDULER_add_now (&sendtask, NULL);
   }
   if (1 == messages_recv)
@@ -210,16 +211,18 @@
        /* Received manipulated message */
        dur_delayed = GNUNET_TIME_absolute_get_duration(start_delayed);
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                  "Received delayed message %u after %llu\n",
+                  "Received delayed message %u after %s\n",
                   messages_recv,
-                  (long long unsigned int) dur_delayed.rel_value);
-      if (dur_delayed.rel_value < 1000)
+                  GNUNET_STRINGS_relative_time_to_string (dur_delayed,
+                                                         GNUNET_YES));
+      if (dur_delayed.rel_value_us < 1000 * 1000LL)
       {
-                               GNUNET_break (0);
-                               ok += 1;
+       GNUNET_break (0);
+       ok += 1;
         GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                    "Delayed message was not delayed correctly: took only 
%llu\n",
-                    (long long unsigned int) dur_delayed.rel_value);
+                    "Delayed message was not delayed correctly: took only 
%s\n",
+                    GNUNET_STRINGS_relative_time_to_string (dur_delayed,
+                                                           GNUNET_YES));
       }
 
       /* shutdown */
@@ -291,7 +294,7 @@
   if (1 == messages_recv)
   {
                ats[0].type = htonl (GNUNET_ATS_QUALITY_NET_DELAY);
-               ats[0].value = htonl (1000);
+               ats[0].value = htonl (1000LL * 1000LL);
                GNUNET_TRANSPORT_set_traffic_metric (p2->th, &p1->id, 
GNUNET_NO, GNUNET_YES, ats, 1);
                ats[0].type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE);
                ats[0].value = htonl (10);

Modified: gnunet/src/transport/test_transport_api_reliability.c
===================================================================
--- gnunet/src/transport/test_transport_api_reliability.c       2013-08-11 
20:40:36 UTC (rev 28500)
+++ gnunet/src/transport/test_transport_api_reliability.c       2013-08-11 
21:21:56 UTC (rev 28501)
@@ -123,11 +123,11 @@
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n");
 
-  delta = GNUNET_TIME_absolute_get_duration (start_time).rel_value;
+  delta = GNUNET_TIME_absolute_get_duration (start_time).rel_value_us;
   FPRINTF (stderr, "\nThroughput was %llu kb/s\n",
-           total_bytes * 1000 / 1024 / delta);
+           total_bytes * 1024 / delta);
   GNUNET_asprintf (&value_name, "reliable_%s", test_plugin);
-  GAUGER ("TRANSPORT", value_name, (int) (total_bytes * 1000 / 1024 / delta),
+  GAUGER ("TRANSPORT", value_name, (int) (total_bytes / 1024 / delta),
           "kb/s");
   GNUNET_free (value_name);
 

Modified: gnunet/src/transport/test_transport_api_timeout.c
===================================================================
--- gnunet/src/transport/test_transport_api_timeout.c   2013-08-11 20:40:36 UTC 
(rev 28500)
+++ gnunet/src/transport/test_transport_api_timeout.c   2013-08-11 21:21:56 UTC 
(rev 28501)
@@ -111,8 +111,10 @@
   {
     ok = disconnects;
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Fail! Had %u disconnects while waiting %llu seconds \n",
-                disconnects, WAIT.rel_value);
+                "Fail! Had %u disconnects while waiting %s\n",
+                disconnects, 
+               GNUNET_STRINGS_relative_time_to_string (WAIT,
+                                                       GNUNET_YES));
   }
 
   GNUNET_TRANSPORT_TESTING_done (tth);
@@ -193,8 +195,8 @@
       GNUNET_TIME_relative_add (time_running,
                                 GNUNET_TIME_relative_divide (WAIT, 10));
 
-  if (time_running.rel_value ==
-      GNUNET_TIME_relative_max (time_running, WAIT).rel_value)
+  if (time_running.rel_value_us ==
+      GNUNET_TIME_relative_max (time_running, WAIT).rel_value_us)
   {
     FPRINTF (stderr, "%s",  "100%%\n");
     shutdown_flag = GNUNET_YES;
@@ -221,7 +223,10 @@
 
   shutdown_flag = GNUNET_NO;
 
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Waiting for %llu seconds\n", 
(WAIT.rel_value) / 1000);
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 
+             "Waiting for %s\n",
+             GNUNET_STRINGS_relative_time_to_string (WAIT,
+                                                     GNUNET_YES));
 
   if (die_task != GNUNET_SCHEDULER_NO_TASK)
     GNUNET_SCHEDULER_cancel (die_task);

Modified: gnunet/src/transport/test_transport_api_unreliability.c
===================================================================
--- gnunet/src/transport/test_transport_api_unreliability.c     2013-08-11 
20:40:36 UTC (rev 28500)
+++ gnunet/src/transport/test_transport_api_unreliability.c     2013-08-11 
21:21:56 UTC (rev 28501)
@@ -131,11 +131,11 @@
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n");
 
-  delta = GNUNET_TIME_absolute_get_duration (start_time).rel_value;
+  delta = GNUNET_TIME_absolute_get_duration (start_time).rel_value_us;
   FPRINTF (stderr, "\nThroughput was %llu kb/s\n",
-           total_bytes * 1000 / 1024 / delta);
+           total_bytes * 1024 / delta);
   GNUNET_asprintf (&value_name, "unreliable_%s", test_plugin);
-  GAUGER ("TRANSPORT", value_name, (int) (total_bytes * 1000 / 1024 / delta),
+  GAUGER ("TRANSPORT", value_name, (int) (total_bytes / 1024 / delta),
           "kb/s");
   GNUNET_free (value_name);
 

Modified: gnunet/src/transport/test_transport_api_unreliability_constant.c
===================================================================
--- gnunet/src/transport/test_transport_api_unreliability_constant.c    
2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/transport/test_transport_api_unreliability_constant.c    
2013-08-11 21:21:56 UTC (rev 28501)
@@ -122,16 +122,15 @@
 end ()
 {
   unsigned long long delta;
-
   char *value_name;
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n");
 
-  delta = GNUNET_TIME_absolute_get_duration (start_time).rel_value;
+  delta = GNUNET_TIME_absolute_get_duration (start_time).rel_value_us;
   FPRINTF (stderr, "\nThroughput was %llu kb/s\n",
-           total_bytes * 1000 / 1024 / delta);
+           total_bytes / 1024 / delta);
   GNUNET_asprintf (&value_name, "unreliable_%s", test_plugin);
-  GAUGER ("TRANSPORT", value_name, (int) (total_bytes * 1000 / 1024 / delta),
+  GAUGER ("TRANSPORT", value_name, (int) (total_bytes / 1024 / delta),
           "kb/s");
   GNUNET_free (value_name);
 

Modified: gnunet/src/transport/transport_api.c
===================================================================
--- gnunet/src/transport/transport_api.c        2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/transport/transport_api.c        2013-08-11 21:21:56 UTC (rev 
28501)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2009, 2010, 2011 Christian Grothoff (and other contributing authors)
+     (C) 2009-2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -744,7 +744,7 @@
     if (th->notify_size + sizeof (struct OutboundMessage) > size)
       break;                    /* does not fit */
     if (GNUNET_BANDWIDTH_tracker_get_delay
-        (&n->out_tracker, th->notify_size).rel_value > 0)
+        (&n->out_tracker, th->notify_size).rel_value_us > 0)
       break;                    /* too early */
     GNUNET_assert (n == GNUNET_CONTAINER_heap_remove_root (h->ready_heap));
     n->hn = NULL;
@@ -801,7 +801,7 @@
   GNUNET_assert (NULL != h->client);
   /* destroy all requests that have timed out */
   while ((NULL != (n = GNUNET_CONTAINER_heap_peek (h->ready_heap))) &&
-         (GNUNET_TIME_absolute_get_remaining (n->th->timeout).rel_value == 0))
+         (0 == GNUNET_TIME_absolute_get_remaining 
(n->th->timeout).rel_value_us))
   {
     /* notify client that the request could not be satisfied within
      * the given time constraints */
@@ -868,8 +868,8 @@
   else
     return;                     /* no work to be done */
   LOG (GNUNET_ERROR_TYPE_DEBUG,
-       "Scheduling next transmission to service in %llu ms\n",
-       (unsigned long long) delay.rel_value);
+       "Scheduling next transmission to service in %s\n",
+       GNUNET_STRINGS_relative_time_to_string (delay, GNUNET_YES));
   h->quota_task =
       GNUNET_SCHEDULER_add_delayed (delay, &schedule_transmission_task, h);
 }
@@ -1007,8 +1007,8 @@
     GNUNET_free (th);
   }
   LOG (GNUNET_ERROR_TYPE_DEBUG,
-       "Scheduling task to reconnect to transport service in %llu ms.\n",
-       h->reconnect_delay.rel_value);
+       "Scheduling task to reconnect to transport service in %s.\n",
+       GNUNET_STRINGS_relative_time_to_string(h->reconnect_delay, GNUNET_YES));
   h->reconnect_task =
       GNUNET_SCHEDULER_add_delayed (h->reconnect_delay, &reconnect, h);
   h->reconnect_delay = GNUNET_TIME_STD_BACKOFF (h->reconnect_delay);
@@ -1564,12 +1564,13 @@
   /* calculate when our transmission should be ready */
   delay = GNUNET_BANDWIDTH_tracker_get_delay (&n->out_tracker, size + 
n->traffic_overhead);
   n->traffic_overhead = 0;
-  if (delay.rel_value > timeout.rel_value)
-    delay.rel_value = 0;        /* notify immediately (with failure) */
+  if (delay.rel_value_us > timeout.rel_value_us)
+    delay.rel_value_us = 0;        /* notify immediately (with failure) */
   LOG (GNUNET_ERROR_TYPE_DEBUG,
-       "Bandwidth tracker allows next transmission to peer %s in %llu ms\n",
-       GNUNET_i2s (target), (unsigned long long) delay.rel_value);
-  n->hn = GNUNET_CONTAINER_heap_insert (handle->ready_heap, n, 
delay.rel_value);
+       "Bandwidth tracker allows next transmission to peer %s in %s\n",
+       GNUNET_i2s (target), 
+       GNUNET_STRINGS_relative_time_to_string (delay, GNUNET_YES));
+  n->hn = GNUNET_CONTAINER_heap_insert (handle->ready_heap, n, 
delay.rel_value_us);
   schedule_transmission (handle);
   return th;
 }

Modified: gnunet/src/util/bandwidth.c
===================================================================
--- gnunet/src/util/bandwidth.c 2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/util/bandwidth.c 2013-08-11 21:21:56 UTC (rev 28501)
@@ -1,10 +1,10 @@
 /*
      This file is part of GNUnet.
-     (C) 2010 Christian Grothoff (and other contributing authors)
+     (C) 2010, 2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
-     by the Free Software Foundation; either version 2, or (at your
+     by the Free Software Foundation; either version 3, or (at your
      option) any later version.
 
      GNUnet is distributed in the hope that it will be useful, but
@@ -83,9 +83,9 @@
   b = ntohl (bps.value__);
   LOG (GNUNET_ERROR_TYPE_DEBUG,
        "Bandwidth has %llu bytes available until deadline in %s\n",
-       (unsigned long long) ((b * deadline.rel_value + 500LL) / 1000LL),
+       (unsigned long long) ((b * deadline.rel_value_us + 500000LL) / 
1000000LL),
        GNUNET_STRINGS_relative_time_to_string (deadline, GNUNET_YES));
-  return (b * deadline.rel_value + 500LL) / 1000LL;
+  return (b * deadline.rel_value_us + 500000LL) / 1000000LL;
 }
 
 
@@ -105,16 +105,17 @@
   struct GNUNET_TIME_Relative ret;
 
   b = ntohl (bps.value__);
-  if (b == 0)
+  if (0 == b)
   {
     LOG (GNUNET_ERROR_TYPE_DEBUG,
          "Bandwidth suggests delay of infinity (zero bandwidth)\n");
     return GNUNET_TIME_UNIT_FOREVER_REL;
   }
-  ret.rel_value = size * 1000LL / b;
+  ret.rel_value_us = size * 1000LL * 1000LL / b;
   LOG (GNUNET_ERROR_TYPE_DEBUG,
-       "Bandwidth suggests delay of %llu ms for %llu bytes of traffic\n",
-       (unsigned long long) ret.rel_value, (unsigned long long) size);
+       "Bandwidth suggests delay of %s for %llu bytes of traffic\n",
+       GNUNET_STRINGS_relative_time_to_string (ret, GNUNET_YES),
+       (unsigned long long) size);
   return ret;
 }
 
@@ -158,16 +159,17 @@
 update_tracker (struct GNUNET_BANDWIDTH_Tracker *av)
 {
   struct GNUNET_TIME_Absolute now;
+  struct GNUNET_TIME_Relative delta;
   uint64_t delta_time;
   uint64_t delta_avail;
   uint64_t left_bytes;
   uint64_t max_carry;
 
   now = GNUNET_TIME_absolute_get ();
-  delta_time = now.abs_value - av->last_update__.abs_value;
+  delta_time = now.abs_value_us - av->last_update__.abs_value_us;
   delta_avail =
       (delta_time * ((unsigned long long) av->available_bytes_per_s__) +
-       500LL) / 1000LL;
+       500000LL) / 1000000LL;
   av->consumption_since_last_update__ -= delta_avail;
   av->last_update__ = now;
   if (av->consumption_since_last_update__ < 0)
@@ -181,10 +183,11 @@
     else
       av->consumption_since_last_update__ = -max_carry;
   }
+  delta.rel_value_us = delta_time;
   LOG (GNUNET_ERROR_TYPE_DEBUG,
-       "Tracker %p  updated, have %u Bps, last update was %llu ms ago\n", av,
+       "Tracker %p updated, have %u Bps, last update was %s ago\n", av,
        (unsigned int) av->available_bytes_per_s__,
-       (unsigned long long) delta_time);
+       GNUNET_STRINGS_relative_time_to_string (delta, GNUNET_YES));
 }
 
 
@@ -251,22 +254,26 @@
 
   if (av->available_bytes_per_s__ == 0)
   {
-    LOG (GNUNET_ERROR_TYPE_DEBUG, "Tracker %p delay is infinity\n", av);
+    LOG (GNUNET_ERROR_TYPE_DEBUG, 
+        "Tracker %p delay is infinity\n", av);
     return GNUNET_TIME_UNIT_FOREVER_REL;
   }
   update_tracker (av);
   bytes_needed = size + av->consumption_since_last_update__;
   if (bytes_needed <= 0)
   {
-    LOG (GNUNET_ERROR_TYPE_DEBUG, "Tracker %p delay for %u bytes is zero\n", 
av,
+    LOG (GNUNET_ERROR_TYPE_DEBUG,
+        "Tracker %p delay for %u bytes is zero\n", av,
          (unsigned int) size);
     return GNUNET_TIME_UNIT_ZERO;
   }
-  ret.rel_value =
-      (1000LL * bytes_needed) /
+  ret.rel_value_us =
+      (1000LL * 1000LL * bytes_needed) /
       (unsigned long long) av->available_bytes_per_s__;
-  LOG (GNUNET_ERROR_TYPE_DEBUG, "Tracker %p delay for %u bytes is %llu ms\n",
-       av, (unsigned int) size, (unsigned long long) ret.rel_value);
+  LOG (GNUNET_ERROR_TYPE_DEBUG, 
+       "Tracker %p delay for %u bytes is %s\n",
+       av, (unsigned int) size, 
+       GNUNET_STRINGS_relative_time_to_string (ret, GNUNET_YES));
   return ret;
 }
 
@@ -293,7 +300,7 @@
                                                   (av->last_update__));
   used = av->consumption_since_last_update__;
   LOG (GNUNET_ERROR_TYPE_DEBUG,
-       "Tracker %p  available bandwidth is %lld bytes\n", av,
+       "Tracker %p available bandwidth is %lld bytes\n", av,
        (long long) (int64_t) (avail - used));
   return (int64_t) (avail - used);
 }
@@ -314,7 +321,8 @@
   uint32_t new_limit;
 
   new_limit = ntohl (bytes_per_second_limit.value__);
-  LOG (GNUNET_ERROR_TYPE_DEBUG, "Tracker %p bandwidth changed to %u Bps\n", av,
+  LOG (GNUNET_ERROR_TYPE_DEBUG, 
+       "Tracker %p bandwidth changed to %u Bps\n", av,
        (unsigned int) new_limit);
   update_tracker (av);
   old_limit = av->available_bytes_per_s__;

Modified: gnunet/src/util/client.c
===================================================================
--- gnunet/src/util/client.c    2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/util/client.c    2013-08-11 21:21:56 UTC (rev 28501)
@@ -1,10 +1,10 @@
 /*
      This file is part of GNUnet.
-     (C) 2001, 2002, 2006, 2008, 2009, 2012 Christian Grothoff (and other 
contributing authors)
+     (C) 2001-2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
-     by the Free Software Foundation; either version 2, or (at your
+     by the Free Software Foundation; either version 3, or (at your
      option) any later version.
 
      GNUnet is distributed in the hope that it will be useful, but
@@ -409,7 +409,7 @@
                                  cfg))
     return NULL;
   connection = do_connect (service_name, cfg, 0);
-  client = GNUNET_malloc (sizeof (struct GNUNET_CLIENT_Connection));
+  client = GNUNET_new (struct GNUNET_CLIENT_Connection);
   client->first_message = GNUNET_YES;
   client->attempts = 1;
   client->connection = connection;
@@ -536,7 +536,7 @@
   check_complete (client);
   /* check for timeout */
   remaining = GNUNET_TIME_absolute_get_remaining (client->receive_timeout);
-  if (0 == remaining.rel_value)
+  if (0 == remaining.rel_value_us)
   {
     /* signal timeout! */
     if (NULL != client->receiver_handler)
@@ -1094,9 +1094,9 @@
   if (NULL == buf)
   {
     delay = GNUNET_TIME_absolute_get_remaining (th->timeout);
-    delay.rel_value /= 2;
+    delay.rel_value_us /= 2;
     if ((GNUNET_YES != th->auto_retry) || (0 == --th->attempts_left) ||
-        (delay.rel_value < 1)||
+        (delay.rel_value_us < 1)||
        (0 != (GNUNET_SCHEDULER_get_reason() & 
GNUNET_SCHEDULER_REASON_SHUTDOWN)))
     {
       LOG (GNUNET_ERROR_TYPE_DEBUG,

Modified: gnunet/src/util/common_logging.c
===================================================================
--- gnunet/src/util/common_logging.c    2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/util/common_logging.c    2013-08-11 21:21:56 UTC (rev 28501)
@@ -1,10 +1,10 @@
 /*
      This file is part of GNUnet.
-     (C) 2006, 2008, 2009 Christian Grothoff (and other contributing authors)
+     (C) 2006-2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
-     by the Free Software Foundation; either version 2, or (at your
+     by the Free Software Foundation; either version 3, or (at your
      option) any later version.
 
      GNUnet is distributed in the hope that it will be useful, but
@@ -26,17 +26,15 @@
  */
 #include "platform.h"
 #include "gnunet_common.h"
-#include "gnunet_crypto_lib.h"
-#include "gnunet_strings_lib.h"
-#include "gnunet_time_lib.h"
-
+#include "gnunet_util_lib.h"
 #include <regex.h>
 
+
 /**
  * After how many milliseconds do we always print
  * that "message X was repeated N times"?  Use 12h.
  */
-#define BULK_DELAY_THRESHOLD (12 * 60 * 60 * 1000)
+#define BULK_DELAY_THRESHOLD (12 * 60 * 60 * 1000LL * 1000LL)
 
 /**
  * After how many repetitions do we always print
@@ -800,7 +798,7 @@
   char *last;
   const char *ft;
 
-  if ((last_bulk_time.abs_value == 0) || (last_bulk_repeat == 0))
+  if ((0 == last_bulk_time.abs_value_us) || (0 == last_bulk_repeat))
     return;
   rev = 0;
   last = memchr (last_bulk, '\0', BULK_TRACK_SIZE);
@@ -951,12 +949,13 @@
     if (NULL != tmptr)
       (void) setup_log_file (tmptr);
     if ((0 != (kind & GNUNET_ERROR_TYPE_BULK)) &&
-        (last_bulk_time.abs_value != 0) &&
+        (0 != last_bulk_time.abs_value_us) &&
         (0 == strncmp (buf, last_bulk, sizeof (last_bulk))))
     {
       last_bulk_repeat++;
-      if ((GNUNET_TIME_absolute_get_duration (last_bulk_time).rel_value >
-           BULK_DELAY_THRESHOLD) || (last_bulk_repeat > BULK_REPEAT_THRESHOLD))
+      if ( (GNUNET_TIME_absolute_get_duration (last_bulk_time).rel_value_us >
+           BULK_DELAY_THRESHOLD) || 
+          (last_bulk_repeat > BULK_REPEAT_THRESHOLD) )
         flush_bulk (date);
       return;
     }

Modified: gnunet/src/util/connection.c
===================================================================
--- gnunet/src/util/connection.c        2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/util/connection.c        2013-08-11 21:21:56 UTC (rev 28501)
@@ -1,10 +1,10 @@
 /*
      This file is part of GNUnet.
-     (C) 2009, 2012 Christian Grothoff (and other contributing authors)
+     (C) 2009-2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
-     by the Free Software Foundation; either version 2, or (at your
+     by the Free Software Foundation; either version 3, or (at your
      option) any later version.
 
      GNUnet is distributed in the hope that it will be useful, but
@@ -33,11 +33,8 @@
 
 #include "platform.h"
 #include "gnunet_common.h"
-#include "gnunet_connection_lib.h"
-#include "gnunet_container_lib.h"
+#include "gnunet_util_lib.h"
 #include "gnunet_resolver_service.h"
-#include "gnunet_scheduler_lib.h"
-#include "gnunet_server_lib.h"
 
 
 #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__)
@@ -304,7 +301,7 @@
 {
   struct GNUNET_CONNECTION_Handle *connection;
 
-  connection = GNUNET_malloc (sizeof (struct GNUNET_CONNECTION_Handle));
+  connection = GNUNET_new (struct GNUNET_CONNECTION_Handle);
   connection->write_buffer_size = GNUNET_SERVER_MIN_BUFFER_SIZE;
   connection->write_buffer = GNUNET_malloc (connection->write_buffer_size);
   connection->sock = osSocket;
@@ -362,7 +359,7 @@
   if ((AF_INET6 == sa->sa_family) && (IN6_IS_ADDR_V4MAPPED (&v6->sin6_addr)))
   {
     /* convert to V4 address */
-    v4 = GNUNET_malloc (sizeof (struct sockaddr_in));
+    v4 = GNUNET_new (struct sockaddr_in);
     memset (v4, 0, sizeof (struct sockaddr_in));
     v4->sin_family = AF_INET;
 #if HAVE_SOCKADDR_IN_SIN_LEN
@@ -432,7 +429,7 @@
     GNUNET_free (uaddr);
     return NULL;
   }
-  connection = GNUNET_malloc (sizeof (struct GNUNET_CONNECTION_Handle));
+  connection = GNUNET_new (struct GNUNET_CONNECTION_Handle);
   connection->write_buffer_size = GNUNET_SERVER_MIN_BUFFER_SIZE;
   connection->write_buffer = GNUNET_malloc (connection->write_buffer_size);
   connection->addr = uaddr;
@@ -800,7 +797,7 @@
   struct GNUNET_CONNECTION_Handle *connection;
 
   GNUNET_assert (0 < strlen (hostname));        /* sanity check */
-  connection = GNUNET_malloc (sizeof (struct GNUNET_CONNECTION_Handle));
+  connection = GNUNET_new (struct GNUNET_CONNECTION_Handle);
   connection->cfg = cfg;
   connection->write_buffer_size = GNUNET_SERVER_MIN_BUFFER_SIZE;
   connection->write_buffer = GNUNET_malloc (connection->write_buffer_size);
@@ -834,7 +831,7 @@
   size_t slen;
 
   GNUNET_assert (0 < strlen (unixpath));        /* sanity check */
-  un = GNUNET_malloc (sizeof (struct sockaddr_un));
+  un = GNUNET_new (struct sockaddr_un);
   un->sun_family = AF_UNIX;
   slen = strlen (unixpath);
   if (slen >= sizeof (un->sun_path))
@@ -848,7 +845,7 @@
 #if LINUX
   un->sun_path[0] = '\0';
 #endif
-  connection = GNUNET_malloc (sizeof (struct GNUNET_CONNECTION_Handle));
+  connection = GNUNET_new (struct GNUNET_CONNECTION_Handle);
   connection->cfg = cfg;
   connection->write_buffer_size = GNUNET_SERVER_MIN_BUFFER_SIZE;
   connection->write_buffer = GNUNET_malloc (connection->write_buffer_size);
@@ -1042,9 +1039,9 @@
   if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_TIMEOUT))
   {
     LOG (GNUNET_ERROR_TYPE_DEBUG,
-        "Receive from `%s' encounters error: timeout (%p)\n",
+        "Receive from `%s' encounters error: timeout (%s, %p)\n",
         GNUNET_a2s (connection->addr, connection->addrlen),
-        GNUNET_TIME_absolute_get_duration 
(connection->receive_timeout).rel_value,
+        GNUNET_STRINGS_relative_time_to_string 
(GNUNET_TIME_absolute_get_duration (connection->receive_timeout), GNUNET_YES),
         connection);
     signal_receive_timeout (connection);
     return;

Modified: gnunet/src/util/gnunet-service-resolver.c
===================================================================
--- gnunet/src/util/gnunet-service-resolver.c   2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/util/gnunet-service-resolver.c   2013-08-11 21:21:56 UTC (rev 
28501)
@@ -1,10 +1,10 @@
 /*
      This file is part of GNUnet.
-     (C) 2007, 2008, 2009, 2012 Christian Grothoff (and other contributing 
authors)
+     (C) 2007-2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
-     by the Free Software Foundation; either version 2, or (at your
+     by the Free Software Foundation; either version 3, or (at your
      option) any later version.
 
      GNUnet is distributed in the hope that it will be useful, but
@@ -217,8 +217,8 @@
            (0 != memcmp (pos->ip, ip, ip_len))) )
   {
     next = pos->next;
-    if (GNUNET_TIME_absolute_get_duration (pos->last_request).rel_value <
-        60 * 60 * 1000)
+    if (GNUNET_TIME_absolute_get_duration (pos->last_request).rel_value_us <
+        60 * 60 * 1000 * 1000LL)
     {
       GNUNET_CONTAINER_DLL_remove (cache_head,
                                   cache_tail,
@@ -231,8 +231,8 @@
   if (pos != NULL)
   {
     pos->last_request = now;
-    if (GNUNET_TIME_absolute_get_duration (pos->last_request).rel_value <
-        60 * 60 * 1000)
+    if (GNUNET_TIME_absolute_get_duration (pos->last_request).rel_value_us <
+        60 * 60 * 1000 * 1000LL)
     {
       GNUNET_free_non_null (pos->addr);
       pos->addr = NULL;

Modified: gnunet/src/util/load.c
===================================================================
--- gnunet/src/util/load.c      2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/util/load.c      2013-08-11 21:21:56 UTC (rev 28501)
@@ -1,10 +1,10 @@
 /*
      This file is part of GNUnet.
-     (C) 2010 Christian Grothoff (and other contributing authors)
+     (C) 2010, 2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
-     by the Free Software Foundation; either version 2, or (at your
+     by the Free Software Foundation; either version 3, or (at your
      option) any later version.
 
      GNUnet is distributed in the hope that it will be useful, but
@@ -24,7 +24,7 @@
  * @author Christian Grothoff
  */
 #include "platform.h"
-#include "gnunet_load_lib.h"
+#include "gnunet_util_lib.h"
 
 
 #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__)
@@ -87,18 +87,18 @@
   struct GNUNET_TIME_Relative delta;
   unsigned int n;
 
-  if (load->autodecline.rel_value == GNUNET_TIME_UNIT_FOREVER_REL.rel_value)
+  if (load->autodecline.rel_value_us == 
GNUNET_TIME_UNIT_FOREVER_REL.rel_value_us)
     return;
   delta = GNUNET_TIME_absolute_get_duration (load->last_update);
-  if (delta.rel_value < load->autodecline.rel_value)
+  if (delta.rel_value_us < load->autodecline.rel_value_us)
     return;
-  if (load->autodecline.rel_value == 0)
+  if (0 == load->autodecline.rel_value_us)
   {
     load->runavg_delay = 0.0;
     load->load = 0;
     return;
   }
-  n = delta.rel_value / load->autodecline.rel_value;
+  n = delta.rel_value_us / load->autodecline.rel_value_us;
   if (n > 16)
   {
     load->runavg_delay = 0.0;
@@ -126,7 +126,7 @@
 {
   struct GNUNET_LOAD_Value *ret;
 
-  ret = GNUNET_malloc (sizeof (struct GNUNET_LOAD_Value));
+  ret = GNUNET_new (struct GNUNET_LOAD_Value);
   ret->autodecline = autodecline;
   ret->last_update = GNUNET_TIME_absolute_get ();
   return ret;

Modified: gnunet/src/util/network.c
===================================================================
--- gnunet/src/util/network.c   2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/util/network.c   2013-08-11 21:21:56 UTC (rev 28501)
@@ -1,10 +1,10 @@
 /*
      This file is part of GNUnet.
-     (C) 2009, 2012 Christian Grothoff (and other contributing authors)
+     (C) 2009-2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
-     by the Free Software Foundation; either version 2, or (at your
+     by the Free Software Foundation; either version 3, or (at your
      option) any later version.
 
      GNUnet is distributed in the hope that it will be useful, but
@@ -1332,7 +1332,7 @@
   }
 
   if ((nfds == 0) &&
-      (timeout.rel_value == GNUNET_TIME_UNIT_FOREVER_REL.rel_value)
+      (timeout.rel_value_us == GNUNET_TIME_UNIT_FOREVER_REL.rel_value_us)
 #ifdef MINGW
       && handles == 0
 #endif
@@ -1345,25 +1345,26 @@
          "select");
   }
 #ifndef MINGW
-  tv.tv_sec = timeout.rel_value / GNUNET_TIME_UNIT_SECONDS.rel_value;
+  tv.tv_sec = timeout.rel_value_us / GNUNET_TIME_UNIT_SECONDS.rel_value_us;
   tv.tv_usec =
-      1000 * (timeout.rel_value -
-              (tv.tv_sec * GNUNET_TIME_UNIT_SECONDS.rel_value));
-  return select (nfds, (rfds != NULL) ? &rfds->sds : NULL,
-                 (wfds != NULL) ? &wfds->sds : NULL,
-                 (efds != NULL) ? &efds->sds : NULL,
-                 (timeout.rel_value ==
-                  GNUNET_TIME_UNIT_FOREVER_REL.rel_value) ? NULL : &tv);
+    (timeout.rel_value_us -
+     (tv.tv_sec * GNUNET_TIME_UNIT_SECONDS.rel_value_us));
+  return select (nfds, 
+                (NULL != rfds) ? &rfds->sds : NULL,
+                 (NULL != wfds) ? &wfds->sds : NULL,
+                 (NULL != efds) ? &efds->sds : NULL,
+                 (timeout.rel_value_us ==
+                  GNUNET_TIME_UNIT_FOREVER_REL.rel_value_us) ? NULL : &tv);
 
 #else
 #define SAFE_FD_ISSET(fd, set)  (set != NULL && FD_ISSET(fd, set))
   /* calculate how long we need to wait in milliseconds */
-  if (timeout.rel_value == GNUNET_TIME_UNIT_FOREVER_REL.rel_value)
+  if (timeout.rel_value_us == GNUNET_TIME_UNIT_FOREVER_REL.rel_value_us)
     ms_total = INFINITE;
   else
   {
-    ms_total = timeout.rel_value / GNUNET_TIME_UNIT_MILLISECONDS.rel_value;
-    if (timeout.rel_value / GNUNET_TIME_UNIT_MILLISECONDS.rel_value > 
0xFFFFFFFFLL - 1)
+    ms_total = timeout.rel_value_us / 
GNUNET_TIME_UNIT_MILLISECONDS.rel_value_us;
+    if (timeout.rel_value_us / GNUNET_TIME_UNIT_MILLISECONDS.rel_value_us > 
0xFFFFFFFFLL - 1)
     {
       GNUNET_break (0);
       ms_total = 0xFFFFFFFF - 1;
@@ -1376,7 +1377,7 @@
     return 0;
   }
 
-  if (select_thread == NULL)
+  if (NULL == select_thread)
   {
     SOCKET select_listening_socket = -1;
     struct sockaddr_in s_in;
@@ -1742,15 +1743,16 @@
   if (nfds > 0)
   {
     LOG (GNUNET_ERROR_TYPE_DEBUG,
-         "Adding the socket event to the array as %d\n", nhandles);
+         "Adding the socket event to the array as %d\n",
+        nhandles);
     handle_array[nhandles++] = select_finished_event;
-    if (timeout.rel_value == GNUNET_TIME_UNIT_FOREVER_REL.rel_value)
+    if (timeout.rel_value_us == GNUNET_TIME_UNIT_FOREVER_REL.rel_value_us)
       sp.tv = NULL;
     else
     {
-      select_timeout.tv_sec = timeout.rel_value / 
GNUNET_TIME_UNIT_SECONDS.rel_value;
-      select_timeout.tv_usec = 1000 * (timeout.rel_value -
-          (select_timeout.tv_sec * GNUNET_TIME_UNIT_SECONDS.rel_value));
+      select_timeout.tv_sec = timeout.rel_value_us / 
GNUNET_TIME_UNIT_SECONDS.rel_value_us;
+      select_timeout.tv_usec =(timeout.rel_value_us -
+          (select_timeout.tv_sec * GNUNET_TIME_UNIT_SECONDS.rel_value_us));
       sp.tv = &select_timeout;
     }
     FD_SET (select_wakeup_socket, &aread);

Modified: gnunet/src/util/perf_crypto_hash.c
===================================================================
--- gnunet/src/util/perf_crypto_hash.c  2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/util/perf_crypto_hash.c  2013-08-11 21:21:56 UTC (rev 28501)
@@ -53,9 +53,9 @@
           GNUNET_STRINGS_relative_time_to_string 
(GNUNET_TIME_absolute_get_duration (start),
                                                  GNUNET_YES));
   GAUGER ("UTIL", "Cryptographic hashing",
-          1024 * 64 * 1024 / (1 +
-                              GNUNET_TIME_absolute_get_duration
-                              (start).rel_value), "kb/s");
+          64 * 1024 / (1 +
+                      GNUNET_TIME_absolute_get_duration
+                      (start).rel_value_us / 1000LL), "kb/ms");
   return 0;
 }
 

Modified: gnunet/src/util/perf_malloc.c
===================================================================
--- gnunet/src/util/perf_malloc.c       2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/util/perf_malloc.c       2013-08-11 21:21:56 UTC (rev 28501)
@@ -53,13 +53,13 @@
 
   start = GNUNET_TIME_absolute_get ();
   kb = perfMalloc ();
-  printf ("Malloc perf took %llu ms\n",
-          (unsigned long long)
-          GNUNET_TIME_absolute_get_duration (start).rel_value);
+  printf ("Malloc perf took %s\n",
+          GNUNET_STRINGS_relative_time_to_string 
(GNUNET_TIME_absolute_get_duration (start),
+                                                 GNUNET_YES));
   GAUGER ("UTIL", "Allocation",
           kb / 1024 / (1 +
-                              GNUNET_TIME_absolute_get_duration
-                              (start).rel_value), "kb/s");
+                      GNUNET_TIME_absolute_get_duration
+                      (start).rel_value_us / 1000LL), "kb/ms");
   return 0;
 }
 

Modified: gnunet/src/util/resolver_api.c
===================================================================
--- gnunet/src/util/resolver_api.c      2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/util/resolver_api.c      2013-08-11 21:21:56 UTC (rev 28501)
@@ -1,10 +1,10 @@
 /*
      This file is part of GNUnet.
-     (C) 2009, 2011 Christian Grothoff (and other contributing authors)
+     (C) 2009-2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
-     by the Free Software Foundation; either version 2, or (at your
+     by the Free Software Foundation; either version 3, or (at your
      option) any later version.
 
      GNUnet is distributed in the hope that it will be useful, but
@@ -24,13 +24,9 @@
  * @author Christian Grothoff
  */
 #include "platform.h"
-#include "gnunet_getopt_lib.h"
-#include "gnunet_os_lib.h"
-#include "gnunet_client_lib.h"
-#include "gnunet_container_lib.h"
+#include "gnunet_util_lib.h"
 #include "gnunet_protocols.h"
 #include "gnunet_resolver_service.h"
-#include "gnunet_server_lib.h"
 #include "resolver.h"
 
 #define LOG(kind,...) GNUNET_log_from (kind, "resolver-api", __VA_ARGS__)
@@ -703,8 +699,8 @@
     }
   }
   LOG (GNUNET_ERROR_TYPE_DEBUG,
-       "Will try to connect to DNS service in %llu ms\n",
-       (unsigned long long) backoff.rel_value);
+       "Will try to connect to DNS service in %s\n",
+       GNUNET_STRINGS_relative_time_to_string (backoff, GNUNET_YES));
   GNUNET_assert (NULL != resolver_cfg);
   r_task = GNUNET_SCHEDULER_add_delayed (backoff, &reconnect_task, NULL);
   backoff = GNUNET_TIME_STD_BACKOFF (backoff);

Modified: gnunet/src/util/scheduler.c
===================================================================
--- gnunet/src/util/scheduler.c 2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/util/scheduler.c 2013-08-11 21:21:56 UTC (rev 28501)
@@ -1,10 +1,10 @@
 /*
       This file is part of GNUnet
-      (C) 2009, 2011 Christian Grothoff (and other contributing authors)
+      (C) 2009-2013 Christian Grothoff (and other contributing authors)
 
       GNUnet is free software; you can redistribute it and/or modify
       it under the terms of the GNU General Public License as published
-      by the Free Software Foundation; either version 2, or (at your
+      by the Free Software Foundation; either version 3, or (at your
       option) any later version.
 
       GNUnet is distributed in the hope that it will be useful, but
@@ -300,7 +300,7 @@
   if (pos != NULL)
   {
     to = GNUNET_TIME_absolute_get_difference (now, pos->timeout);
-    if (timeout->rel_value > to.rel_value)
+    if (timeout->rel_value_us > to.rel_value_us)
       *timeout = to;
     if (pos->reason != 0)
       *timeout = GNUNET_TIME_UNIT_ZERO;
@@ -308,10 +308,10 @@
   pos = pending;
   while (pos != NULL)
   {
-    if (pos->timeout.abs_value != GNUNET_TIME_UNIT_FOREVER_ABS.abs_value)
+    if (pos->timeout.abs_value_us != GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us)
     {
       to = GNUNET_TIME_absolute_get_difference (now, pos->timeout);
-      if (timeout->rel_value > to.rel_value)
+      if (timeout->rel_value_us > to.rel_value_us)
         *timeout = to;
     }
     if (pos->read_fd != -1)
@@ -373,7 +373,7 @@
   enum GNUNET_SCHEDULER_Reason reason;
 
   reason = task->reason;
-  if (now.abs_value >= task->timeout.abs_value)
+  if (now.abs_value_us >= task->timeout.abs_value_us)
     reason |= GNUNET_SCHEDULER_REASON_TIMEOUT;
   if ((0 == (reason & GNUNET_SCHEDULER_REASON_READ_READY)) &&
       (((task->read_fd != -1) &&
@@ -433,7 +433,7 @@
   while (pos != NULL)
   {
     next = pos->next;
-    if (now.abs_value >= pos->timeout.abs_value)
+    if (now.abs_value_us >= pos->timeout.abs_value_us)
       pos->reason |= GNUNET_SCHEDULER_REASON_TIMEOUT;
     if (0 == pos->reason)
       break;
@@ -569,8 +569,8 @@
     current_lifeness = pos->lifeness;
     active_task = pos;
 #if PROFILE_DELAYS
-    if (GNUNET_TIME_absolute_get_duration (pos->start_time).rel_value >
-        DELAY_THRESHOLD.rel_value)
+    if (GNUNET_TIME_absolute_get_duration (pos->start_time).rel_value_us >
+        DELAY_THRESHOLD.rel_value_us)
     {
       LOG (GNUNET_ERROR_TYPE_DEBUG, 
           "Task %llu took %s to be scheduled\n",
@@ -777,7 +777,7 @@
       GNUNET_abort ();
       break;
     }
-    if ((ret == 0) && (timeout.rel_value == 0) && (busy_wait_warning > 16))
+    if ((0 == ret) && (0 == timeout.rel_value_us) && (busy_wait_warning > 16))
     {
       LOG (GNUNET_ERROR_TYPE_WARNING, _("Looks like we're busy waiting...\n"));
       sleep (1);                /* mitigate */
@@ -1091,7 +1091,7 @@
   prev = pending_timeout_last;
   if (prev != NULL)
   {
-    if (prev->timeout.abs_value > t->timeout.abs_value)
+    if (prev->timeout.abs_value_us > t->timeout.abs_value_us)
       prev = NULL;
     else
       pos = prev->next;         /* heuristic success! */
@@ -1102,8 +1102,8 @@
     pos = pending_timeout;
   }
   while ((pos != NULL) &&
-         ((pos->timeout.abs_value <= t->timeout.abs_value) ||
-          (pos->reason != 0)))
+         ((pos->timeout.abs_value_us <= t->timeout.abs_value_us) ||
+          (0 != pos->reason)))
   {
     prev = pos;
     pos = pos->next;

Modified: gnunet/src/util/server.c
===================================================================
--- gnunet/src/util/server.c    2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/util/server.c    2013-08-11 21:21:56 UTC (rev 28501)
@@ -1,10 +1,10 @@
 /*
      This file is part of GNUnet.
-     (C) 2009, 2012 Christian Grothoff (and other contributing authors)
+     (C) 2009-2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
-     by the Free Software Foundation; either version 2, or (at your
+     by the Free Software Foundation; either version 3, or (at your
      option) any later version.
 
      GNUnet is distributed in the hope that it will be useful, but
@@ -1032,8 +1032,8 @@
     if (GNUNET_OK == ret)
     {
       LOG (GNUNET_ERROR_TYPE_DEBUG,
-           "Server re-enters receive loop, timeout: %llu.\n",
-           client->idle_timeout.rel_value);
+           "Server re-enters receive loop, timeout: %s.\n",
+           GNUNET_STRINGS_relative_time_to_string (client->idle_timeout, 
GNUNET_YES));
       client->receive_pending = GNUNET_YES;
       GNUNET_CONNECTION_receive (client->connection,
                                  GNUNET_SERVER_MAX_MESSAGE_SIZE - 1,
@@ -1094,7 +1094,7 @@
   if ((NULL == buf) && (0 == available) && (NULL == addr) && (0 == errCode) &&
       (GNUNET_YES != client->shutdown_now) && (NULL != server) &&
       (GNUNET_YES == GNUNET_CONNECTION_check (client->connection)) &&
-      (end.abs_value > now.abs_value))
+      (end.abs_value_us > now.abs_value_us))
   {
     /* wait longer, timeout changed (i.e. due to us sending) */
     LOG (GNUNET_ERROR_TYPE_DEBUG,

Modified: gnunet/src/util/speedup.c
===================================================================
--- gnunet/src/util/speedup.c   2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/util/speedup.c   2013-08-11 21:21:56 UTC (rev 28501)
@@ -1,10 +1,10 @@
 /*
      This file is part of GNUnet.
-     (C) 2001, 2002, 2006, 2009 Christian Grothoff (and other contributing 
authors)
+     (C) 2011-2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
-     by the Free Software Foundation; either version 2, or (at your
+     by the Free Software Foundation; either version 3, or (at your
      option) any later version.
 
      GNUnet is distributed in the hope that it will be useful, but
@@ -24,8 +24,7 @@
  * @brief functions to speedup peer execution by manipulation system time
  */
 #include "platform.h"
-#include "gnunet_time_lib.h"
-#include "gnunet_scheduler_lib.h"
+#include "gnunet_util_lib.h"
 
 #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__)
 
@@ -45,10 +44,11 @@
   speedup_task = GNUNET_SCHEDULER_NO_TASK;
   if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason))
     return;
-  current_offset += delta.rel_value;
+  current_offset += delta.rel_value_us;
   GNUNET_TIME_set_offset (current_offset);
   LOG (GNUNET_ERROR_TYPE_DEBUG, 
-       "Speeding up execution time by %llu ms\n", delta.rel_value);
+       "Speeding up execution time by %s\n", 
+       GNUNET_STRINGS_relative_time_to_string (delta, GNUNET_NO));
   speedup_task = GNUNET_SCHEDULER_add_delayed (interval, &do_speedup, NULL);
 }
 
@@ -67,15 +67,18 @@
   if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_time (cfg, "testing", 
"SPEEDUP_DELTA", &delta))
     return GNUNET_SYSERR;
 
-  if ((0 == interval.rel_value) || (0 == delta.rel_value))
+  if ((0 == interval.rel_value_us) || (0 == delta.rel_value_us))
   {
     LOG (GNUNET_ERROR_TYPE_DEBUG,
         "Speed up disabled\n");
     return GNUNET_OK;
   }
   LOG (GNUNET_ERROR_TYPE_DEBUG,
-       "Speed up execution time %llu ms every %llu ms\n",
-       delta.rel_value, interval.rel_value);
+       "Speed up execution by %s\n",
+       GNUNET_STRINGS_relative_time_to_string (delta, GNUNET_NO));
+  LOG (GNUNET_ERROR_TYPE_DEBUG,
+       "Speed up executed every %s\n",
+       GNUNET_STRINGS_relative_time_to_string (interval, GNUNET_NO));
   speedup_task = GNUNET_SCHEDULER_add_now_with_lifeness (GNUNET_NO, 
&do_speedup, NULL);
   return GNUNET_OK;
 }
@@ -92,7 +95,8 @@
     GNUNET_SCHEDULER_cancel (speedup_task);
     speedup_task = GNUNET_SCHEDULER_NO_TASK;
   }
-  if ((0 != interval.rel_value) && (0 != delta.rel_value))
+  if ( (0 != interval.rel_value_us) && 
+       (0 != delta.rel_value_us) )
     LOG (GNUNET_ERROR_TYPE_DEBUG,
         "Stopped execution speed up\n");
 }

Modified: gnunet/src/util/strings.c
===================================================================
--- gnunet/src/util/strings.c   2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/util/strings.c   2013-08-11 21:21:56 UTC (rev 28501)
@@ -1,10 +1,10 @@
 /*
      This file is part of GNUnet.
-     (C) 2005, 2006 Christian Grothoff (and other contributing authors)
+     (C) 2005-2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
-     by the Free Software Foundation; either version 2, or (at your
+     by the Free Software Foundation; either version 3, or (at your
      option) any later version.
 
      GNUnet is distributed in the hope that it will be useful, but
@@ -300,18 +300,19 @@
 {
   static const struct ConversionTable table[] =
   {
-    { "ms", 1},
-    { "s", 1000},
-    { "\"", 1000},
-    { "m", 60 * 1000},
-    { "min", 60 * 1000},
-    { "minutes", 60 * 1000},
-    { "'", 60 * 1000},
-    { "h", 60 * 60 * 1000},
-    { "d", 24 * 60 * 60 * 1000},
-    { "day", 24 * 60 * 60 * 1000},
-    { "days", 24 * 60 * 60 * 1000},
-    { "a", 31536000000LL /* year */ },
+    { "us", 1},
+    { "ms", 1000 },
+    { "s", 1000 * 1000LL },
+    { "\"", 1000  * 1000LL },
+    { "m", 60 * 1000  * 1000LL},
+    { "min", 60 * 1000  * 1000LL},
+    { "minutes", 60 * 1000  * 1000LL},
+    { "'", 60 * 1000  * 1000LL},
+    { "h", 60 * 60 * 1000  * 1000LL},
+    { "d", 24 * 60 * 60 * 1000LL * 1000LL},
+    { "day", 24 * 60 * 60 * 1000LL * 1000LL},
+    { "days", 24 * 60 * 60 * 1000LL * 1000LL},
+    { "a", 31536000000000LL /* year */ },
     { NULL, 0}
   };
   int ret;
@@ -325,7 +326,7 @@
   ret = convert_with_table (fancy_time,
                            table,
                            &val);
-  rtime->rel_value = (uint64_t) val;
+  rtime->rel_value_us = (uint64_t) val;
   return ret;
 }
 
@@ -363,9 +364,9 @@
        (NULL == strptime (fancy_time, "%Y", &tv)) )
     return GNUNET_SYSERR;
   t = mktime (&tv);
-  atime->abs_value = (uint64_t) ((uint64_t) t * 1000LL);
+  atime->abs_value_us = (uint64_t) ((uint64_t) t * 1000LL * 1000LL);
 #if LINUX
-  atime->abs_value -= 1000LL * timezone;
+  atime->abs_value_us -= 1000LL * 1000LL * timezone;
 #endif
   return GNUNET_OK;
 }
@@ -380,7 +381,10 @@
  *  string is returned.
  */
 char *
-GNUNET_STRINGS_conv (const char *input, size_t len, const char *input_charset, 
const char *output_charset)
+GNUNET_STRINGS_conv (const char *input,
+                    size_t len, 
+                    const char *input_charset, 
+                    const char *output_charset)
 {
   char *ret;
   uint8_t *u8_string;
@@ -634,41 +638,48 @@
                                        int do_round)
 {
   static char buf[128];
-  const char *unit = _( /* time unit */ "ms");
-  uint64_t dval = delta.rel_value;
+  const char *unit = _( /* time unit */ "µs");
+  uint64_t dval = delta.rel_value_us;
 
-  if (GNUNET_TIME_UNIT_FOREVER_REL.rel_value == delta.rel_value)
+  if (GNUNET_TIME_UNIT_FOREVER_REL.rel_value_us == delta.rel_value_us)
     return _("forever");
-  if (0 == delta.rel_value)
+  if (0 == delta.rel_value_us)
     return _("0 ms");
   if ( ( (GNUNET_YES == do_round) && 
         (dval > 5 * 1000) ) || 
        (0 == (dval % 1000) ))
   {
     dval = dval / 1000;
-    unit = _( /* time unit */ "s");
-    if ( ( (GNUNET_YES == do_round) &&
-          (dval > 5 * 60) ) ||
-        (0 == (dval % 60) ) )
+    unit = _( /* time unit */ "ms");
+    if ( ( (GNUNET_YES == do_round) && 
+          (dval > 5 * 1000) ) || 
+        (0 == (dval % 1000) ))
     {
-      dval = dval / 60;
-      unit = _( /* time unit */ "m");
+      dval = dval / 1000;
+      unit = _( /* time unit */ "s");
       if ( ( (GNUNET_YES == do_round) &&
-            (dval > 5 * 60) ) || 
-          (0 == (dval % 60) ))
+            (dval > 5 * 60) ) ||
+          (0 == (dval % 60) ) )
       {
-        dval = dval / 60;
-        unit = _( /* time unit */ "h");
-        if ( ( (GNUNET_YES == do_round) &&
-              (dval > 5 * 24) ) ||
-            (0 == (dval % 24)) )
+       dval = dval / 60;
+       unit = _( /* time unit */ "m");
+       if ( ( (GNUNET_YES == do_round) &&
+              (dval > 5 * 60) ) || 
+            (0 == (dval % 60) ))
        {
-          dval = dval / 24;
-         if (1 == dval)
-           unit = _( /* time unit */ "day");
-         else
-           unit = _( /* time unit */ "days");
-        }
+         dval = dval / 60;
+         unit = _( /* time unit */ "h");
+         if ( ( (GNUNET_YES == do_round) &&
+                (dval > 5 * 24) ) ||
+              (0 == (dval % 24)) )
+         {
+           dval = dval / 24;
+           if (1 == dval)
+             unit = _( /* time unit */ "day");
+           else
+             unit = _( /* time unit */ "days");
+         }
+       }
       }
     }
   }
@@ -693,9 +704,9 @@
   time_t tt;
   struct tm *tp;
 
-  if (t.abs_value == GNUNET_TIME_UNIT_FOREVER_ABS.abs_value)
+  if (t.abs_value_us == GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us)
     return _("end of time");
-  tt = t.abs_value / 1000;
+  tt = t.abs_value_us / 1000LL / 1000LL;
   tp = gmtime (&tt);
   strftime (buf, sizeof (buf), "%a %b %d %H:%M:%S %Y", tp);
   return buf;

Modified: gnunet/src/util/test_common_logging_dummy.c
===================================================================
--- gnunet/src/util/test_common_logging_dummy.c 2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/util/test_common_logging_dummy.c 2013-08-11 21:21:56 UTC (rev 
28501)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2008 Christian Grothoff (and other contributing authors)
+     (C) 2008-2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -59,7 +59,7 @@
   GNUNET_log (kind, "L%s %d\n", lvl, expensive_func());\
   t2 = GNUNET_TIME_absolute_get ();\
   printf ("1%s %llu\n", lvl,\
-          (unsigned long long) GNUNET_TIME_absolute_get_difference (t1, 
t2).rel_value); \
+          (unsigned long long) GNUNET_TIME_absolute_get_difference (t1, 
t2).rel_value_us); \
 }
 
 #define pr2(kind,lvl) {\
@@ -68,7 +68,7 @@
   GNUNET_log (kind, "L%s %d\n", lvl, expensive_func());\
   t2 = GNUNET_TIME_absolute_get ();\
   printf ("2%s %llu\n", lvl,\
-          (unsigned long long) GNUNET_TIME_absolute_get_difference (t1, 
t2).rel_value); \
+          (unsigned long long) GNUNET_TIME_absolute_get_difference (t1, 
t2).rel_value_us); \
 }
 
 int

Modified: gnunet/src/util/test_crypto_ecc.c
===================================================================
--- gnunet/src/util/test_crypto_ecc.c   2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/util/test_crypto_ecc.c   2013-08-11 21:21:56 UTC (rev 28501)
@@ -166,9 +166,9 @@
       continue;
     }
   }
-  printf ("%d ECC sign operations %llu ms\n", ITER,
-          (unsigned long long)
-          GNUNET_TIME_absolute_get_duration (start).rel_value);
+  printf ("%d ECC sign operations %s\n", ITER,
+          GNUNET_STRINGS_relative_time_to_string 
(GNUNET_TIME_absolute_get_duration (start),
+                                                 GNUNET_YES));
   return ok;
 }
 #endif

Modified: gnunet/src/util/test_scheduler_delay.c
===================================================================
--- gnunet/src/util/test_scheduler_delay.c      2013-08-11 20:40:36 UTC (rev 
28500)
+++ gnunet/src/util/test_scheduler_delay.c      2013-08-11 21:21:56 UTC (rev 
28501)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2001, 2002, 2003, 2004, 2006 Christian Grothoff (and other 
contributing authors)
+     (C) 2001-2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -20,13 +20,11 @@
 /**
  * @file util/test_scheduler_delay.c
  * @brief testcase for delay of scheduler, measures how
- *  precise the timers are.  Expect values between 10 and 20 ms on
+ *  precise the timers are.  Expect values between 0.2 and 2 ms on
  *  modern machines.
  */
 #include "platform.h"
-#include "gnunet_common.h"
-#include "gnunet_scheduler_lib.h"
-#include "gnunet_time_lib.h"
+#include "gnunet_util_lib.h"
 
 static struct GNUNET_TIME_Absolute target;
 
@@ -36,8 +34,9 @@
 
 #define INCR 47
 
-#define MAXV 1500
+#define MAXV 5000
 
+
 /**
  * Signature of the main function of a task.
  *
@@ -45,18 +44,19 @@
  * @param tc context
  */
 static void
-test_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+test_task (void *cls,
+          const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   struct GNUNET_TIME_Absolute now;
 
   now = GNUNET_TIME_absolute_get ();
-  if (now.abs_value > target.abs_value)
-    cumDelta += (now.abs_value - target.abs_value);
+  if (now.abs_value_us > target.abs_value_us)
+    cumDelta += (now.abs_value_us - target.abs_value_us);
   else
-    cumDelta += (target.abs_value - now.abs_value);
+    cumDelta += (target.abs_value_us - now.abs_value_us);
   target =
       GNUNET_TIME_relative_to_absolute (GNUNET_TIME_relative_multiply
-                                        (GNUNET_TIME_UNIT_MILLISECONDS, i));
+                                        (GNUNET_TIME_UNIT_MICROSECONDS, i));
   FPRINTF (stderr, "%s",  ".");
   if (i > MAXV)
   {
@@ -64,7 +64,7 @@
     return;
   }
   GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply
-                                (GNUNET_TIME_UNIT_MILLISECONDS, i), &test_task,
+                                (GNUNET_TIME_UNIT_MICROSECONDS, i), &test_task,
                                 NULL);
   i += INCR;
 }
@@ -76,13 +76,14 @@
   GNUNET_log_setup ("test-scheduler-delay", "WARNING", NULL);
   target = GNUNET_TIME_absolute_get ();
   GNUNET_SCHEDULER_run (&test_task, NULL);
-  FPRINTF (stdout, "Sleep precision: %llu ms. ",
-           cumDelta / 1000 / (MAXV / INCR));
-  if (cumDelta <= 10 * MAXV / INCR)
+  FPRINTF (stdout, 
+          "Sleep precision: %llu microseconds (average delta). ",
+           cumDelta / (MAXV / INCR));
+  if (cumDelta <= 500 * MAXV / INCR)
     FPRINTF (stdout, "%s",  "Timer precision is excellent.\n");
-  else if (cumDelta <= 50 * MAXV / INCR)        /* 50 ms average deviation */
+  else if (cumDelta <= 5000 * MAXV / INCR)        /* 5 ms average deviation */
     FPRINTF (stdout, "%s",  "Timer precision is good.\n");
-  else if (cumDelta > 250 * MAXV / INCR)
+  else if (cumDelta > 25000 * MAXV / INCR)
     FPRINTF (stdout, "%s",  "Timer precision is awful.\n");
   else
     FPRINTF (stdout, "%s",  "Timer precision is acceptable.\n");

Modified: gnunet/src/util/test_speedup.c
===================================================================
--- gnunet/src/util/test_speedup.c      2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/util/test_speedup.c      2013-08-11 21:21:56 UTC (rev 28501)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2001, 2002, 2003, 2004, 2006, 2009 Christian Grothoff (and other 
contributing authors)
+     (C) 2011-2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -22,10 +22,7 @@
  * @brief testcase for speedup.c
  */
 #include "platform.h"
-#include "gnunet_common.h"
-#include "gnunet_program_lib.h"
-#include "gnunet_time_lib.h"
-#include "gnunet_strings_lib.h"
+#include "gnunet_util_lib.h"
 
 /**
  * Start time of the testcase
@@ -100,19 +97,23 @@
                       "nohelp", options, &check, NULL);
 
   end_real = time (NULL);
-  delta = GNUNET_TIME_absolute_get_difference(start, end);
+  delta = GNUNET_TIME_absolute_get_difference (start, end);
 
-  if (delta.rel_value >  ((end_real - start_real) * 1500LL))
+  if (delta.rel_value_us >  ((end_real - start_real) * 1500LL * 1000LL))
   {
-    GNUNET_log  (GNUNET_ERROR_TYPE_DEBUG, "Execution time in GNUnet time: %llu 
ms\n", 
-                (unsigned long long) delta.rel_value);
-    GNUNET_log  (GNUNET_ERROR_TYPE_DEBUG, "Execution time in system time: %llu 
ms\n", 
+    GNUNET_log  (GNUNET_ERROR_TYPE_DEBUG, 
+                "Execution time in GNUnet time: %s\n", 
+                GNUNET_STRINGS_relative_time_to_string (delta, GNUNET_YES));
+    GNUNET_log  (GNUNET_ERROR_TYPE_DEBUG,
+                "Execution time in system time: %llu ms\n", 
                 (unsigned long long) ((end_real - start_real) * 1000LL));
     return 0;
   }
-  GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Execution time in GNUnet time: %llu 
ms\n", 
-             (unsigned long long) delta.rel_value);
-  GNUNET_log  (GNUNET_ERROR_TYPE_ERROR, "Execution time in system time: %llu 
ms\n", 
+  GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 
+             "Execution time in GNUnet time: %s\n", 
+             GNUNET_STRINGS_relative_time_to_string (delta, GNUNET_YES));
+  GNUNET_log  (GNUNET_ERROR_TYPE_ERROR, 
+              "Execution time in system time: %llu ms\n", 
               (unsigned long long) ((end_real - start_real) * 1000LL));
   return 1;
 }

Modified: gnunet/src/util/test_strings.c
===================================================================
--- gnunet/src/util/test_strings.c      2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/util/test_strings.c      2013-08-11 21:21:56 UTC (rev 28501)
@@ -87,7 +87,7 @@
   WANT ("btx", b);
   if (0 != GNUNET_STRINGS_buffer_tokenize (buf, 2, 2, &r, &b))
     return 1;
-  at.abs_value = 5000;
+  at.abs_value_us = 5000000;
   bc = GNUNET_STRINGS_absolute_time_to_string (at);
   /* bc should be something like "Wed Dec 31 17:00:05 1969"
    * where the details of the day and hour depend on the timezone;
@@ -105,7 +105,7 @@
   bc = GNUNET_STRINGS_absolute_time_to_string (at);
   GNUNET_assert (GNUNET_OK ==
                 GNUNET_STRINGS_fancy_time_to_absolute (bc, &atx));
-  GNUNET_assert (atx.abs_value == at.abs_value);
+  GNUNET_assert (atx.abs_value_us == at.abs_value_us);
 
   GNUNET_log_skip (2, GNUNET_NO);
   b = GNUNET_STRINGS_to_utf8 ("TEST", 4, "unknown");
@@ -116,7 +116,7 @@
       GNUNET_STRINGS_fancy_time_to_relative ("15m", &rt));
   GNUNET_assert (GNUNET_OK ==
       GNUNET_STRINGS_fancy_time_to_relative ("15 m", &rtx));
-  GNUNET_assert (rt.rel_value == rtx.rel_value);
+  GNUNET_assert (rt.rel_value_us == rtx.rel_value_us);
 
   return 0;
 }

Modified: gnunet/src/util/test_time.c
===================================================================
--- gnunet/src/util/test_time.c 2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/util/test_time.c 2013-08-11 21:21:56 UTC (rev 28501)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2001, 2002, 2003, 2004, 2006, 2009 Christian Grothoff (and other 
contributing authors)
+     (C) 2001-2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -22,8 +22,7 @@
  * @brief testcase for time.c
  */
 #include "platform.h"
-#include "gnunet_common.h"
-#include "gnunet_time_lib.h"
+#include "gnunet_util_lib.h"
 
 
 int
@@ -46,186 +45,186 @@
   forever = GNUNET_TIME_UNIT_FOREVER_ABS;
   relForever = GNUNET_TIME_UNIT_FOREVER_REL;
   relUnit = GNUNET_TIME_UNIT_MILLISECONDS;
-  zero.abs_value = 0;
+  zero.abs_value_us = 0;
 
   last = now = GNUNET_TIME_absolute_get ();
-  while (now.abs_value == last.abs_value)
+  while (now.abs_value_us == last.abs_value_us)
     now = GNUNET_TIME_absolute_get ();
-  GNUNET_assert (now.abs_value > last.abs_value);
+  GNUNET_assert (now.abs_value_us > last.abs_value_us);
 
   /* test overflow checking in multiply */
-  rel = GNUNET_TIME_UNIT_SECONDS;
+  rel = GNUNET_TIME_UNIT_MILLISECONDS;
   GNUNET_log_skip (1, GNUNET_NO);
   for (i = 0; i < 55; i++)
     rel = GNUNET_TIME_relative_multiply (rel, 2);
   GNUNET_log_skip (0, GNUNET_NO);
-  GNUNET_assert (rel.rel_value == GNUNET_TIME_UNIT_FOREVER_REL.rel_value);
+  GNUNET_assert (rel.rel_value_us == 
GNUNET_TIME_UNIT_FOREVER_REL.rel_value_us);
   /*check zero */
-  rel.rel_value = (UINT64_MAX) - 1024;
-  GNUNET_assert (GNUNET_TIME_UNIT_ZERO.rel_value ==
-                 GNUNET_TIME_relative_multiply (rel, 0).rel_value);
+  rel.rel_value_us = (UINT64_MAX) - 1024;
+  GNUNET_assert (GNUNET_TIME_UNIT_ZERO.rel_value_us ==
+                 GNUNET_TIME_relative_multiply (rel, 0).rel_value_us);
 
   /* test infinity-check for relative to absolute */
   GNUNET_log_skip (1, GNUNET_NO);
   last = GNUNET_TIME_relative_to_absolute (rel);
-  GNUNET_assert (last.abs_value == GNUNET_TIME_UNIT_FOREVER_ABS.abs_value);
+  GNUNET_assert (last.abs_value_us == 
GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us);
   GNUNET_log_skip (0, GNUNET_YES);
 
   /*check relative to absolute */
-  rel.rel_value = 0;
-  GNUNET_assert (GNUNET_TIME_absolute_get ().abs_value ==
-                 GNUNET_TIME_relative_to_absolute (rel).abs_value);
+  rel.rel_value_us = 0;
+  GNUNET_assert (GNUNET_TIME_absolute_get ().abs_value_us ==
+                 GNUNET_TIME_relative_to_absolute (rel).abs_value_us);
   /*check forever */
-  rel.rel_value = UINT64_MAX;
-  GNUNET_assert (GNUNET_TIME_UNIT_FOREVER_ABS.abs_value ==
-                 GNUNET_TIME_relative_to_absolute (rel).abs_value);
+  rel.rel_value_us = UINT64_MAX;
+  GNUNET_assert (GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us ==
+                 GNUNET_TIME_relative_to_absolute (rel).abs_value_us);
   /* check overflow for r2a */
-  rel.rel_value = (UINT64_MAX) - 1024;
+  rel.rel_value_us = (UINT64_MAX) - 1024;
   GNUNET_log_skip (1, GNUNET_NO);
   last = GNUNET_TIME_relative_to_absolute (rel);
   GNUNET_log_skip (0, GNUNET_NO);
-  GNUNET_assert (last.abs_value == GNUNET_TIME_UNIT_FOREVER_ABS.abs_value);
+  GNUNET_assert (last.abs_value_us == 
GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us);
 
   /* check overflow for relative add */
   GNUNET_log_skip (1, GNUNET_NO);
   rel = GNUNET_TIME_relative_add (rel, rel);
   GNUNET_log_skip (0, GNUNET_NO);
-  GNUNET_assert (rel.rel_value == GNUNET_TIME_UNIT_FOREVER_REL.rel_value);
+  GNUNET_assert (rel.rel_value_us == 
GNUNET_TIME_UNIT_FOREVER_REL.rel_value_us);
 
   GNUNET_log_skip (1, GNUNET_NO);
   rel = GNUNET_TIME_relative_add (relForever, relForever);
   GNUNET_log_skip (0, GNUNET_NO);
-  GNUNET_assert (rel.rel_value == relForever.rel_value);
+  GNUNET_assert (rel.rel_value_us == relForever.rel_value_us);
 
   GNUNET_log_skip (1, GNUNET_NO);
   rel = GNUNET_TIME_relative_add (relUnit, relUnit);
-  GNUNET_assert (rel.rel_value == 2 * relUnit.rel_value);
+  GNUNET_assert (rel.rel_value_us == 2 * relUnit.rel_value_us);
 
   /* check relation check in get_duration */
-  future.abs_value = now.abs_value + 1000000;
-  GNUNET_assert (GNUNET_TIME_absolute_get_difference (now, future).rel_value ==
+  future.abs_value_us = now.abs_value_us + 1000000;
+  GNUNET_assert (GNUNET_TIME_absolute_get_difference (now, 
future).rel_value_us ==
                  1000000);
-  GNUNET_assert (GNUNET_TIME_absolute_get_difference (future, now).rel_value ==
+  GNUNET_assert (GNUNET_TIME_absolute_get_difference (future, 
now).rel_value_us ==
                  0);
 
-  GNUNET_assert (GNUNET_TIME_absolute_get_difference (zero, forever).rel_value
-                 == forever.abs_value);
+  GNUNET_assert (GNUNET_TIME_absolute_get_difference (zero, 
forever).rel_value_us
+                 == forever.abs_value_us);
 
-  past.abs_value = now.abs_value - 1000000;
+  past.abs_value_us = now.abs_value_us - 1000000;
   rel = GNUNET_TIME_absolute_get_duration (future);
-  GNUNET_assert (rel.rel_value == 0);
+  GNUNET_assert (rel.rel_value_us == 0);
   rel = GNUNET_TIME_absolute_get_duration (past);
-  GNUNET_assert (rel.rel_value >= 1000000);
+  GNUNET_assert (rel.rel_value_us >= 1000000);
 
   /* check get remaining */
   rel = GNUNET_TIME_absolute_get_remaining (now);
-  GNUNET_assert (rel.rel_value == 0);
+  GNUNET_assert (rel.rel_value_us == 0);
   rel = GNUNET_TIME_absolute_get_remaining (past);
-  GNUNET_assert (rel.rel_value == 0);
+  GNUNET_assert (rel.rel_value_us == 0);
   rel = GNUNET_TIME_absolute_get_remaining (future);
-  GNUNET_assert (rel.rel_value > 0);
-  GNUNET_assert (rel.rel_value <= 1000000);
+  GNUNET_assert (rel.rel_value_us > 0);
+  GNUNET_assert (rel.rel_value_us <= 1000000);
   forever = GNUNET_TIME_UNIT_FOREVER_ABS;
-  GNUNET_assert (GNUNET_TIME_UNIT_FOREVER_REL.rel_value ==
-                 GNUNET_TIME_absolute_get_remaining (forever).rel_value);
+  GNUNET_assert (GNUNET_TIME_UNIT_FOREVER_REL.rel_value_us ==
+                 GNUNET_TIME_absolute_get_remaining (forever).rel_value_us);
 
   /* check endianess */
   reln = GNUNET_TIME_relative_hton (rel);
-  GNUNET_assert (rel.rel_value == GNUNET_TIME_relative_ntoh (reln).rel_value);
+  GNUNET_assert (rel.rel_value_us == GNUNET_TIME_relative_ntoh 
(reln).rel_value_us);
   nown = GNUNET_TIME_absolute_hton (now);
-  GNUNET_assert (now.abs_value == GNUNET_TIME_absolute_ntoh (nown).abs_value);
+  GNUNET_assert (now.abs_value_us == GNUNET_TIME_absolute_ntoh 
(nown).abs_value_us);
 
   /* check absolute addition */
   future = GNUNET_TIME_absolute_add (now, GNUNET_TIME_UNIT_SECONDS);
-  GNUNET_assert (future.abs_value == now.abs_value + 1000);
+  GNUNET_assert (future.abs_value_us == now.abs_value_us + 1000 * 1000LL);
 
   future = GNUNET_TIME_absolute_add (forever, GNUNET_TIME_UNIT_ZERO);
-  GNUNET_assert (future.abs_value == forever.abs_value);
+  GNUNET_assert (future.abs_value_us == forever.abs_value_us);
 
-  rel.rel_value = (UINT64_MAX) - 1024;
-  now.abs_value = rel.rel_value;
+  rel.rel_value_us = (UINT64_MAX) - 1024;
+  now.abs_value_us = rel.rel_value_us;
   future = GNUNET_TIME_absolute_add (now, rel);
-  GNUNET_assert (future.abs_value == forever.abs_value);
+  GNUNET_assert (future.abs_value_us == forever.abs_value_us);
 
   /* check zero */
   future = GNUNET_TIME_absolute_add (now, GNUNET_TIME_UNIT_ZERO);
-  GNUNET_assert (future.abs_value == now.abs_value);
+  GNUNET_assert (future.abs_value_us == now.abs_value_us);
 
-  GNUNET_assert (forever.abs_value ==
+  GNUNET_assert (forever.abs_value_us ==
                  GNUNET_TIME_absolute_subtract (forever,
-                                                
GNUNET_TIME_UNIT_MINUTES).abs_value);
+                                                
GNUNET_TIME_UNIT_MINUTES).abs_value_us);
   /*check absolute subtract */
-  now.abs_value = 50000;
-  rel.rel_value = 100000;
-  GNUNET_assert (GNUNET_TIME_UNIT_ZERO_ABS.abs_value ==
-                 (GNUNET_TIME_absolute_subtract (now, rel)).abs_value);
-  rel.rel_value = 10000;
-  GNUNET_assert (40000 == (GNUNET_TIME_absolute_subtract (now, 
rel)).abs_value);
+  now.abs_value_us = 50000;
+  rel.rel_value_us = 100000;
+  GNUNET_assert (GNUNET_TIME_UNIT_ZERO_ABS.abs_value_us ==
+                 (GNUNET_TIME_absolute_subtract (now, rel)).abs_value_us);
+  rel.rel_value_us = 10000;
+  GNUNET_assert (40000 == (GNUNET_TIME_absolute_subtract (now, 
rel)).abs_value_us);
 
   /*check relative divide */
-  GNUNET_assert (GNUNET_TIME_UNIT_FOREVER_REL.rel_value ==
-                 (GNUNET_TIME_relative_divide (rel, 0)).rel_value);
+  GNUNET_assert (GNUNET_TIME_UNIT_FOREVER_REL.rel_value_us ==
+                 (GNUNET_TIME_relative_divide (rel, 0)).rel_value_us);
 
   rel = GNUNET_TIME_UNIT_FOREVER_REL;
-  GNUNET_assert (GNUNET_TIME_UNIT_FOREVER_REL.rel_value ==
-                 (GNUNET_TIME_relative_divide (rel, 2)).rel_value);
+  GNUNET_assert (GNUNET_TIME_UNIT_FOREVER_REL.rel_value_us ==
+                 (GNUNET_TIME_relative_divide (rel, 2)).rel_value_us);
 
   rel = GNUNET_TIME_relative_divide (relUnit, 2);
-  GNUNET_assert (rel.rel_value == relUnit.rel_value / 2);
+  GNUNET_assert (rel.rel_value_us == relUnit.rel_value_us / 2);
 
 
   /* check Return absolute time of 0ms */
   zero = GNUNET_TIME_UNIT_ZERO_ABS;
 
   /* check GNUNET_TIME_calculate_eta */
-  last.abs_value = GNUNET_TIME_absolute_get ().abs_value - 1024;
+  last.abs_value_us = GNUNET_TIME_absolute_get ().abs_value_us - 1024;
   forever = GNUNET_TIME_UNIT_FOREVER_ABS;
-  forever.abs_value = forever.abs_value - 1024;
-  GNUNET_assert (GNUNET_TIME_UNIT_ZERO_ABS.abs_value ==
-                 GNUNET_TIME_calculate_eta (forever, 50000, 100000).rel_value);
+  forever.abs_value_us = forever.abs_value_us - 1024;
+  GNUNET_assert (GNUNET_TIME_UNIT_ZERO_ABS.abs_value_us ==
+                 GNUNET_TIME_calculate_eta (forever, 50000, 
100000).rel_value_us);
   /* check zero */
   GNUNET_log_skip (1, GNUNET_NO);
-  GNUNET_assert (GNUNET_TIME_UNIT_ZERO.rel_value ==
-                 (GNUNET_TIME_calculate_eta (last, 60000, 50000)).rel_value);
+  GNUNET_assert (GNUNET_TIME_UNIT_ZERO.rel_value_us ==
+                 (GNUNET_TIME_calculate_eta (last, 60000, 
50000)).rel_value_us);
   GNUNET_log_skip (0, GNUNET_YES);
   /*check forever */
-  GNUNET_assert (GNUNET_TIME_UNIT_FOREVER_REL.rel_value ==
-                 (GNUNET_TIME_calculate_eta (last, 0, 50000)).rel_value);
+  GNUNET_assert (GNUNET_TIME_UNIT_FOREVER_REL.rel_value_us ==
+                 (GNUNET_TIME_calculate_eta (last, 0, 50000)).rel_value_us);
 
   /*check relative subtract */
   now = GNUNET_TIME_absolute_get ();
-  rel.rel_value = now.abs_value;
-  relForever.rel_value = rel.rel_value + 1024;
+  rel.rel_value_us = now.abs_value_us;
+  relForever.rel_value_us = rel.rel_value_us + 1024;
   GNUNET_assert (1024 ==
-                 GNUNET_TIME_relative_subtract (relForever, rel).rel_value);
+                 GNUNET_TIME_relative_subtract (relForever, rel).rel_value_us);
   /*check zero */
-  GNUNET_assert (GNUNET_TIME_UNIT_ZERO.rel_value ==
-                 GNUNET_TIME_relative_subtract (rel, relForever).rel_value);
+  GNUNET_assert (GNUNET_TIME_UNIT_ZERO.rel_value_us ==
+                 GNUNET_TIME_relative_subtract (rel, relForever).rel_value_us);
   /*check forever */
-  rel.rel_value = UINT64_MAX;
-  GNUNET_assert (GNUNET_TIME_UNIT_FOREVER_REL.rel_value ==
-                 GNUNET_TIME_relative_subtract (rel, relForever).rel_value);
+  rel.rel_value_us = UINT64_MAX;
+  GNUNET_assert (GNUNET_TIME_UNIT_FOREVER_REL.rel_value_us ==
+                 GNUNET_TIME_relative_subtract (rel, relForever).rel_value_us);
 
   /*check GNUNET_TIME_relative_min */
   now = GNUNET_TIME_absolute_get ();
-  rel.rel_value = now.abs_value;
-  relForever.rel_value = rel.rel_value - 1024;
-  GNUNET_assert (relForever.rel_value ==
-                 GNUNET_TIME_relative_min (rel, relForever).rel_value);
+  rel.rel_value_us = now.abs_value_us;
+  relForever.rel_value_us = rel.rel_value_us - 1024;
+  GNUNET_assert (relForever.rel_value_us ==
+                 GNUNET_TIME_relative_min (rel, relForever).rel_value_us);
 
   /*check GNUNET_TIME_relative_max */
-  GNUNET_assert (rel.rel_value ==
-                 GNUNET_TIME_relative_max (rel, relForever).rel_value);
+  GNUNET_assert (rel.rel_value_us ==
+                 GNUNET_TIME_relative_max (rel, relForever).rel_value_us);
 
   /*check GNUNET_TIME_absolute_min */
   now = GNUNET_TIME_absolute_get ();
-  last.abs_value = now.abs_value - 1024;
-  GNUNET_assert (last.abs_value ==
-                 GNUNET_TIME_absolute_min (now, last).abs_value);
+  last.abs_value_us = now.abs_value_us - 1024;
+  GNUNET_assert (last.abs_value_us ==
+                 GNUNET_TIME_absolute_min (now, last).abs_value_us);
 
   /*check  GNUNET_TIME_absolute_max */
-  GNUNET_assert (now.abs_value ==
-                 GNUNET_TIME_absolute_max (now, last).abs_value);
+  GNUNET_assert (now.abs_value_us ==
+                 GNUNET_TIME_absolute_max (now, last).abs_value_us);
 
   return 0;
 }

Modified: gnunet/src/util/time.c
===================================================================
--- gnunet/src/util/time.c      2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/util/time.c      2013-08-11 21:21:56 UTC (rev 28501)
@@ -1,10 +1,10 @@
 /*
      This file is part of GNUnet.
-     (C) 2001, 2002, 2006, 2009 Christian Grothoff (and other contributing 
authors)
+     (C) 2001-2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
-     by the Free Software Foundation; either version 2, or (at your
+     by the Free Software Foundation; either version 3, or (at your
      option) any later version.
 
      GNUnet is distributed in the hope that it will be useful, but
@@ -70,9 +70,9 @@
   struct timeval tv;
 
   GETTIMEOFDAY (&tv, NULL);
-  ret.abs_value =
-      (uint64_t) (((uint64_t) tv.tv_sec * 1000LL) +
-                  ((uint64_t) tv.tv_usec / 1000LL)) + timestamp_offset;
+  ret.abs_value_us =
+      (uint64_t) (((uint64_t) tv.tv_sec * 1000LL * 1000LL) +
+                  ((uint64_t) tv.tv_usec)) + timestamp_offset;
   return ret;
 }
 
@@ -102,7 +102,7 @@
 
 
 /**
- * Return relative time of 1ms.
+ * Return relative time of 1us.
  */
 struct GNUNET_TIME_Relative
 GNUNET_TIME_relative_get_unit_ ()
@@ -113,12 +113,23 @@
 
 
 /**
+ * Return relative time of 1ms.
+ */
+struct GNUNET_TIME_Relative
+GNUNET_TIME_relative_get_millisecond_ ()
+{
+  static struct GNUNET_TIME_Relative one = { 1000 };
+  return one;
+}
+
+
+/**
  * Return relative time of 1s.
  */
 struct GNUNET_TIME_Relative
 GNUNET_TIME_relative_get_second_ ()
 {
-  static struct GNUNET_TIME_Relative one = { 1000 };
+  static struct GNUNET_TIME_Relative one = { 1000 * 1000LL };
   return one;
 }
 
@@ -129,7 +140,7 @@
 struct GNUNET_TIME_Relative
 GNUNET_TIME_relative_get_minute_ ()
 {
-  static struct GNUNET_TIME_Relative one = { 60 * 1000 };
+  static struct GNUNET_TIME_Relative one = { 60 * 1000 * 1000LL };
   return one;
 }
 
@@ -140,7 +151,7 @@
 struct GNUNET_TIME_Relative
 GNUNET_TIME_relative_get_hour_ ()
 {
-  static struct GNUNET_TIME_Relative one = { 60 * 60 * 1000 };
+  static struct GNUNET_TIME_Relative one = { 60 * 60 * 1000 * 1000LL };
   return one;
 }
 
@@ -176,16 +187,16 @@
 {
   struct GNUNET_TIME_Absolute ret;
 
-  if (rel.rel_value == UINT64_MAX)
+  if (rel.rel_value_us == UINT64_MAX)
     return GNUNET_TIME_UNIT_FOREVER_ABS;
   struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get ();
 
-  if (rel.rel_value + now.abs_value < rel.rel_value)
+  if (rel.rel_value_us + now.abs_value_us < rel.rel_value_us)
   {
     GNUNET_break (0);           /* overflow... */
     return GNUNET_TIME_UNIT_FOREVER_ABS;
   }
-  ret.abs_value = rel.rel_value + now.abs_value;
+  ret.abs_value_us = rel.rel_value_us + now.abs_value_us;
   return ret;
 }
 
@@ -201,7 +212,7 @@
 GNUNET_TIME_relative_min (struct GNUNET_TIME_Relative t1,
                           struct GNUNET_TIME_Relative t2)
 {
-  return (t1.rel_value < t2.rel_value) ? t1 : t2;
+  return (t1.rel_value_us < t2.rel_value_us) ? t1 : t2;
 }
 
 
@@ -216,7 +227,7 @@
 GNUNET_TIME_relative_max (struct GNUNET_TIME_Relative t1,
                           struct GNUNET_TIME_Relative t2)
 {
-  return (t1.rel_value > t2.rel_value) ? t1 : t2;
+  return (t1.rel_value_us > t2.rel_value_us) ? t1 : t2;
 }
 
 
@@ -232,7 +243,7 @@
 GNUNET_TIME_absolute_min (struct GNUNET_TIME_Absolute t1,
                           struct GNUNET_TIME_Absolute t2)
 {
-  return (t1.abs_value < t2.abs_value) ? t1 : t2;
+  return (t1.abs_value_us < t2.abs_value_us) ? t1 : t2;
 }
 
 
@@ -247,7 +258,7 @@
 GNUNET_TIME_absolute_max (struct GNUNET_TIME_Absolute t1,
                           struct GNUNET_TIME_Absolute t2)
 {
-  return (t1.abs_value > t2.abs_value) ? t1 : t2;
+  return (t1.abs_value_us > t2.abs_value_us) ? t1 : t2;
 }
 
 
@@ -262,13 +273,13 @@
 {
   struct GNUNET_TIME_Relative ret;
 
-  if (future.abs_value == UINT64_MAX)
+  if (future.abs_value_us == UINT64_MAX)
     return GNUNET_TIME_UNIT_FOREVER_REL;
   struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get ();
 
-  if (now.abs_value > future.abs_value)
+  if (now.abs_value_us > future.abs_value_us)
     return GNUNET_TIME_UNIT_ZERO;
-  ret.rel_value = future.abs_value - now.abs_value;
+  ret.rel_value_us = future.abs_value_us - now.abs_value_us;
   return ret;
 }
 
@@ -285,11 +296,11 @@
 {
   struct GNUNET_TIME_Relative ret;
 
-  if (end.abs_value == UINT64_MAX)
+  if (end.abs_value_us == UINT64_MAX)
     return GNUNET_TIME_UNIT_FOREVER_REL;
-  if (end.abs_value < start.abs_value)
+  if (end.abs_value_us < start.abs_value_us)
     return GNUNET_TIME_UNIT_ZERO;
-  ret.rel_value = end.abs_value - start.abs_value;
+  ret.rel_value_us = end.abs_value_us - start.abs_value_us;
   return ret;
 }
 
@@ -306,10 +317,10 @@
   struct GNUNET_TIME_Relative ret;
 
   now = GNUNET_TIME_absolute_get ();
-  GNUNET_assert (whence.abs_value != UINT64_MAX);
-  if (whence.abs_value > now.abs_value)
+  GNUNET_assert (whence.abs_value_us != UINT64_MAX);
+  if (whence.abs_value_us > now.abs_value_us)
     return GNUNET_TIME_UNIT_ZERO;
-  ret.rel_value = now.abs_value - whence.abs_value;
+  ret.rel_value_us = now.abs_value_us - whence.abs_value_us;
   return ret;
 }
 
@@ -326,14 +337,14 @@
 {
   struct GNUNET_TIME_Absolute ret;
 
-  if ((start.abs_value == UINT64_MAX) || (duration.rel_value == UINT64_MAX))
+  if ((start.abs_value_us == UINT64_MAX) || (duration.rel_value_us == 
UINT64_MAX))
     return GNUNET_TIME_UNIT_FOREVER_ABS;
-  if (start.abs_value + duration.rel_value < start.abs_value)
+  if (start.abs_value_us + duration.rel_value_us < start.abs_value_us)
   {
     GNUNET_break (0);
     return GNUNET_TIME_UNIT_FOREVER_ABS;
   }
-  ret.abs_value = start.abs_value + duration.rel_value;
+  ret.abs_value_us = start.abs_value_us + duration.rel_value_us;
   return ret;
 }
 
@@ -352,11 +363,11 @@
 {
   struct GNUNET_TIME_Absolute ret;
 
-  if (start.abs_value <= duration.rel_value)
+  if (start.abs_value_us <= duration.rel_value_us)
     return GNUNET_TIME_UNIT_ZERO_ABS;
-  if (start.abs_value == GNUNET_TIME_UNIT_FOREVER_ABS.abs_value)
+  if (start.abs_value_us == GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us)
     return GNUNET_TIME_UNIT_FOREVER_ABS;
-  ret.abs_value = start.abs_value - duration.rel_value;
+  ret.abs_value_us = start.abs_value_us - duration.rel_value_us;
   return ret;
 }
 
@@ -372,10 +383,10 @@
 {
   struct GNUNET_TIME_Relative ret;
 
-  if (factor == 0)
+  if (0 == factor)
     return GNUNET_TIME_UNIT_ZERO;
-  ret.rel_value = rel.rel_value * (unsigned long long) factor;
-  if (ret.rel_value / factor != rel.rel_value)
+  ret.rel_value_us = rel.rel_value_us * (unsigned long long) factor;
+  if (ret.rel_value_us / factor != rel.rel_value_us)
   {
     GNUNET_break (0);
     return GNUNET_TIME_UNIT_FOREVER_REL;
@@ -397,10 +408,10 @@
 {
   struct GNUNET_TIME_Relative ret;
 
-  if ((factor == 0) ||
-      (rel.rel_value == GNUNET_TIME_UNIT_FOREVER_REL.rel_value))
+  if ((0 == factor) ||
+      (rel.rel_value_us == GNUNET_TIME_UNIT_FOREVER_REL.rel_value_us))
     return GNUNET_TIME_UNIT_FOREVER_REL;
-  ret.rel_value = rel.rel_value / (unsigned long long) factor;
+  ret.rel_value_us = rel.rel_value_us / (unsigned long long) factor;
   return ret;
 }
 
@@ -426,11 +437,11 @@
   GNUNET_break (finished <= total);
   if (finished >= total)
     return GNUNET_TIME_UNIT_ZERO;
-  if (finished == 0)
+  if (0 == finished)
     return GNUNET_TIME_UNIT_FOREVER_REL;
   dur = GNUNET_TIME_absolute_get_duration (start);
-  exp = ((double) dur.rel_value) * ((double) total) / ((double) finished);
-  ret.rel_value = ((uint64_t) exp) - dur.rel_value;
+  exp = ((double) dur.rel_value_us) * ((double) total) / ((double) finished);
+  ret.rel_value_us = ((uint64_t) exp) - dur.rel_value_us;
   return ret;
 }
 
@@ -448,14 +459,14 @@
 {
   struct GNUNET_TIME_Relative ret;
 
-  if ((a1.rel_value == UINT64_MAX) || (a2.rel_value == UINT64_MAX))
+  if ((a1.rel_value_us == UINT64_MAX) || (a2.rel_value_us == UINT64_MAX))
     return GNUNET_TIME_UNIT_FOREVER_REL;
-  if (a1.rel_value + a2.rel_value < a1.rel_value)
+  if (a1.rel_value_us + a2.rel_value_us < a1.rel_value_us)
   {
     GNUNET_break (0);
     return GNUNET_TIME_UNIT_FOREVER_REL;
   }
-  ret.rel_value = a1.rel_value + a2.rel_value;
+  ret.rel_value_us = a1.rel_value_us + a2.rel_value_us;
   return ret;
 }
 
@@ -473,11 +484,11 @@
 {
   struct GNUNET_TIME_Relative ret;
 
-  if (a2.rel_value >= a1.rel_value)
+  if (a2.rel_value_us >= a1.rel_value_us)
     return GNUNET_TIME_UNIT_ZERO;
-  if (a1.rel_value == UINT64_MAX)
+  if (a1.rel_value_us == UINT64_MAX)
     return GNUNET_TIME_UNIT_FOREVER_REL;
-  ret.rel_value = a1.rel_value - a2.rel_value;
+  ret.rel_value_us = a1.rel_value_us - a2.rel_value_us;
   return ret;
 }
 
@@ -493,7 +504,7 @@
 {
   struct GNUNET_TIME_RelativeNBO ret;
 
-  ret.rel_value__ = GNUNET_htonll (a.rel_value);
+  ret.rel_value_us__ = GNUNET_htonll (a.rel_value_us);
   return ret;
 }
 
@@ -509,7 +520,7 @@
 {
   struct GNUNET_TIME_Relative ret;
 
-  ret.rel_value = GNUNET_ntohll (a.rel_value__);
+  ret.rel_value_us = GNUNET_ntohll (a.rel_value_us__);
   return ret;
 
 }
@@ -526,7 +537,7 @@
 {
   struct GNUNET_TIME_AbsoluteNBO ret;
 
-  ret.abs_value__ = GNUNET_htonll (a.abs_value);
+  ret.abs_value_us__ = GNUNET_htonll (a.abs_value_us);
   return ret;
 }
 
@@ -542,7 +553,7 @@
 {
   struct GNUNET_TIME_Absolute ret;
 
-  ret.abs_value = GNUNET_ntohll (a.abs_value__);
+  ret.abs_value_us = GNUNET_ntohll (a.abs_value_us__);
   return ret;
 
 }

Modified: gnunet/src/vpn/gnunet-service-vpn.c
===================================================================
--- gnunet/src/vpn/gnunet-service-vpn.c 2013-08-11 20:40:36 UTC (rev 28500)
+++ gnunet/src/vpn/gnunet-service-vpn.c 2013-08-11 21:21:56 UTC (rev 28501)
@@ -1120,7 +1120,7 @@
     ts->destination_port = destination_port;
     ts->heap_node = GNUNET_CONTAINER_heap_insert (tunnel_heap,
                                                  ts,
-                                                 GNUNET_TIME_absolute_get 
().abs_value);
+                                                 GNUNET_TIME_absolute_get 
().abs_value_us);
     GNUNET_assert (GNUNET_YES ==
                   GNUNET_CONTAINER_multihashmap_put (tunnel_map,
                                                      &key,
@@ -1137,7 +1137,7 @@
     is_new = GNUNET_NO;
     GNUNET_CONTAINER_heap_update_cost (tunnel_heap, 
                                       ts->heap_node,
-                                      GNUNET_TIME_absolute_get ().abs_value);
+                                      GNUNET_TIME_absolute_get 
().abs_value_us);
   }
   GNUNET_assert (NULL != ts->tunnel);
   
@@ -2070,7 +2070,7 @@
   }
   GNUNET_CONTAINER_heap_update_cost (tunnel_heap, 
                                     ts->heap_node,
-                                    GNUNET_TIME_absolute_get ().abs_value);
+                                    GNUNET_TIME_absolute_get ().abs_value_us);
   return GNUNET_OK;
 }
 
@@ -2225,7 +2225,7 @@
   }
   GNUNET_CONTAINER_heap_update_cost (tunnel_heap, 
                                     ts->heap_node,
-                                    GNUNET_TIME_absolute_get ().abs_value);
+                                    GNUNET_TIME_absolute_get ().abs_value_us);
   return GNUNET_OK;
 }
 
@@ -2367,7 +2367,7 @@
   }
   GNUNET_CONTAINER_heap_update_cost (tunnel_heap, 
                                     ts->heap_node,
-                                    GNUNET_TIME_absolute_get ().abs_value);
+                                    GNUNET_TIME_absolute_get ().abs_value_us);
   return GNUNET_OK;
 }
 
@@ -2708,7 +2708,7 @@
                                                    
GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE));
   de->heap_node = GNUNET_CONTAINER_heap_insert (destination_heap,
                                                de,
-                                               GNUNET_TIME_absolute_ntoh 
(msg->expiration_time).abs_value);
+                                               GNUNET_TIME_absolute_ntoh 
(msg->expiration_time).abs_value_us);
   GNUNET_STATISTICS_update (stats,
                            gettext_noop ("# Active destinations"),
                            1, GNUNET_NO);
@@ -2814,7 +2814,7 @@
                                                    
GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE));
   de->heap_node = GNUNET_CONTAINER_heap_insert (destination_heap,
                                                de,
-                                               GNUNET_TIME_absolute_ntoh 
(msg->expiration_time).abs_value);
+                                               GNUNET_TIME_absolute_ntoh 
(msg->expiration_time).abs_value_us);
   while (GNUNET_CONTAINER_multihashmap_size (destination_map) > 
max_destination_mappings)
     expire_destination (de);
   ts = create_tunnel_to_destination (de,




reply via email to

[Prev in Thread] Current Thread [Next in Thread]