diff options
Diffstat (limited to 'src/include/gnunet_time_lib.h')
-rw-r--r-- | src/include/gnunet_time_lib.h | 27 |
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 | |||
487 | GNUNET_TIME_get_offset (void); | 487 | GNUNET_TIME_get_offset (void); |
488 | 488 | ||
489 | 489 | ||
490 | /** | ||
491 | * Return the current year (i.e. '2011'). | ||
492 | */ | ||
493 | unsigned int | ||
494 | GNUNET_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 | */ | ||
503 | struct GNUNET_TIME_Absolute | ||
504 | GNUNET_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 | */ | ||
513 | unsigned int | ||
514 | GNUNET_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 |