aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_time_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-09-08 18:07:21 +0000
committerChristian Grothoff <christian@grothoff.org>2013-09-08 18:07:21 +0000
commit834c2cf9268d7738b314bfb1e0f11484500d4dbd (patch)
treef8b190e7f7a3af4266f9c2437caf74bae5a5293f /src/include/gnunet_time_lib.h
parentaf0104f64c68a5c5d0b00507494e81d9080b1aa1 (diff)
downloadgnunet-834c2cf9268d7738b314bfb1e0f11484500d4dbd.tar.gz
gnunet-834c2cf9268d7738b314bfb1e0f11484500d4dbd.zip
-moving time functions from FS to TIME
Diffstat (limited to 'src/include/gnunet_time_lib.h')
-rw-r--r--src/include/gnunet_time_lib.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/include/gnunet_time_lib.h b/src/include/gnunet_time_lib.h
index a739d6d7f..3e87309c6 100644
--- a/src/include/gnunet_time_lib.h
+++ b/src/include/gnunet_time_lib.h
@@ -487,6 +487,33 @@ long long
487GNUNET_TIME_get_offset (void); 487GNUNET_TIME_get_offset (void);
488 488
489 489
490/**
491 * Return the current year (i.e. '2011').
492 */
493unsigned int
494GNUNET_TIME_get_current_year (void);
495
496
497/**
498 * Convert a year to an expiration time of January 1st of that year.
499 *
500 * @param year a year (after 1970, please ;-)).
501 * @return absolute time for January 1st of that year.
502 */
503struct GNUNET_TIME_Absolute
504GNUNET_TIME_year_to_time (unsigned int year);
505
506
507/**
508 * Convert an expiration time to the respective year (rounds)
509 *
510 * @param at absolute time
511 * @return year a year (after 1970), 0 on error
512 */
513unsigned int
514GNUNET_TIME_time_to_year (struct GNUNET_TIME_Absolute at);
515
516
490#if 0 /* keep Emacsens' auto-indent happy */ 517#if 0 /* keep Emacsens' auto-indent happy */
491{ 518{
492#endif 519#endif