use -Wl on -no-undefined as it is a linker option:
[oweals/gnunet.git] / src / include / gnunet_time_lib.h
index 298f3284ab1d083acefe63956832a368ed863379..4db73966cfc0e4479a6acb583945d0b77f6116d1 100644 (file)
@@ -21,8 +21,9 @@
 /**
  * @file include/gnunet_time_lib.h
  * @brief functions related to time
- *
  * @author Christian Grothoff
+ * @defgroup time Time and time calculations
+ * @{
  */
 
 #ifndef GNUNET_TIME_LIB_H
@@ -482,10 +483,37 @@ GNUNET_TIME_set_offset (long long offset);
  *
  * @return the offset we currently skew the locale time by
  */
-long long 
+long long
 GNUNET_TIME_get_offset (void);
 
 
+/**
+ * Return the current year (i.e. '2011').
+ */
+unsigned int
+GNUNET_TIME_get_current_year (void);
+
+
+/**
+ * Convert a year to an expiration time of January 1st of that year.
+ *
+ * @param year a year (after 1970, please ;-)).
+ * @return absolute time for January 1st of that year.
+ */
+struct GNUNET_TIME_Absolute
+GNUNET_TIME_year_to_time (unsigned int year);
+
+
+/**
+ * Convert an expiration time to the respective year (rounds)
+ *
+ * @param at absolute time
+ * @return year a year (after 1970), 0 on error
+ */
+unsigned int
+GNUNET_TIME_time_to_year (struct GNUNET_TIME_Absolute at);
+
+
 #if 0                           /* keep Emacsens' auto-indent happy */
 {
 #endif
@@ -493,6 +521,9 @@ GNUNET_TIME_get_offset (void);
 }
 #endif
 
+/** @} */ /* end of group time */
+
+
 /* ifndef GNUNET_TIME_LIB_H */
 #endif
 /* end of gnunet_time_lib.h */