/**
* 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
*/
/**
* 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;
}
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;
}
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;
}