WiP
[oweals/gnunet.git] / src / util / time.c
index d2e25d05965a3fddb3fff449fdd9aabaee91d954..10e1e6ffa853b462a88a3e100d2a033a3f8372ff 100644 (file)
@@ -208,7 +208,7 @@ GNUNET_TIME_absolute_get_remaining (struct GNUNET_TIME_Absolute future)
 /**
  * Compute the time difference between the given start and end times.
  * Use this function instead of actual subtraction to ensure that
- * "FOREVER" and overflows are handeled correctly.
+ * "FOREVER" and overflows are handled correctly.
  *
  * @return 0 if start >= end; FOREVER if end==FOREVER; otherwise end - start
  */
@@ -227,21 +227,21 @@ GNUNET_TIME_absolute_get_difference (struct GNUNET_TIME_Absolute start,
 
 /**
  * Get the duration of an operation as the
- * difference of the current time and the given start time "hence".
+ * difference of the current time and the given start time "whence".
  *
- * @return aborts if hence==FOREVER, 0 if hence > now, otherwise now-hence.
+ * @return aborts if whence==FOREVER, 0 if whence > now, otherwise now-whence.
  */
 struct GNUNET_TIME_Relative
-GNUNET_TIME_absolute_get_duration (struct GNUNET_TIME_Absolute hence)
+GNUNET_TIME_absolute_get_duration (struct GNUNET_TIME_Absolute whence)
 {
   struct GNUNET_TIME_Absolute now;
   struct GNUNET_TIME_Relative ret;
 
   now = GNUNET_TIME_absolute_get ();
-  GNUNET_assert (hence.abs_value != UINT64_MAX);
-  if (hence.abs_value > now.abs_value)
+  GNUNET_assert (whence.abs_value != UINT64_MAX);
+  if (whence.abs_value > now.abs_value)
     return GNUNET_TIME_relative_get_zero ();
-  ret.rel_value = now.abs_value - hence.abs_value;
+  ret.rel_value = now.abs_value - whence.abs_value;
   return ret;
 }
 
@@ -426,7 +426,7 @@ struct GNUNET_TIME_RelativeNBO
 GNUNET_TIME_relative_hton (struct GNUNET_TIME_Relative a)
 {
   struct GNUNET_TIME_RelativeNBO ret;
-  ret.value__ = GNUNET_htonll (a.rel_value);
+  ret.rel_value__ = GNUNET_htonll (a.rel_value);
   return ret;
 }
 
@@ -440,7 +440,7 @@ struct GNUNET_TIME_Relative
 GNUNET_TIME_relative_ntoh (struct GNUNET_TIME_RelativeNBO a)
 {
   struct GNUNET_TIME_Relative ret;
-  ret.rel_value = GNUNET_ntohll (a.value__);
+  ret.rel_value = GNUNET_ntohll (a.rel_value__);
   return ret;
 
 }
@@ -455,7 +455,7 @@ struct GNUNET_TIME_AbsoluteNBO
 GNUNET_TIME_absolute_hton (struct GNUNET_TIME_Absolute a)
 {
   struct GNUNET_TIME_AbsoluteNBO ret;
-  ret.value__ = GNUNET_htonll (a.abs_value);
+  ret.abs_value__ = GNUNET_htonll (a.abs_value);
   return ret;
 }
 
@@ -469,7 +469,7 @@ struct GNUNET_TIME_Absolute
 GNUNET_TIME_absolute_ntoh (struct GNUNET_TIME_AbsoluteNBO a)
 {
   struct GNUNET_TIME_Absolute ret;
-  ret.abs_value = GNUNET_ntohll (a.value__);
+  ret.abs_value = GNUNET_ntohll (a.abs_value__);
   return ret;
 
 }