* @brief functions for handling time and time arithmetic
*/
#include "platform.h"
-#include "gnunet_time_lib.h"
+#include "gnunet_util_lib.h"
#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__)
*
* @return the offset we currently skew the locale time by
*/
-long long
+long long
GNUNET_TIME_get_offset ()
{
return timestamp_offset;
if (0 == factor)
return GNUNET_TIME_UNIT_ZERO;
+ if (rel.rel_value_us == GNUNET_TIME_UNIT_FOREVER_REL.rel_value_us)
+ return GNUNET_TIME_UNIT_FOREVER_REL;
ret.rel_value_us = rel.rel_value_us * (unsigned long long) factor;
if (ret.rel_value_us / factor != rel.rel_value_us)
{
/**
* Convert an expiration time to the respective year (rounds)
*
- * @param at absolute time
+ * @param at absolute time
* @return year a year (after 1970), 0 on error
*/
-unsigned int
+unsigned int
GNUNET_TIME_time_to_year (struct GNUNET_TIME_Absolute at)
{
struct tm *t;