diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-09-08 18:07:21 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-09-08 18:07:21 +0000 |
commit | 834c2cf9268d7738b314bfb1e0f11484500d4dbd (patch) | |
tree | f8b190e7f7a3af4266f9c2437caf74bae5a5293f /src/include | |
parent | af0104f64c68a5c5d0b00507494e81d9080b1aa1 (diff) | |
download | gnunet-834c2cf9268d7738b314bfb1e0f11484500d4dbd.tar.gz gnunet-834c2cf9268d7738b314bfb1e0f11484500d4dbd.zip |
-moving time functions from FS to TIME
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gnunet_fs_service.h | 27 | ||||
-rw-r--r-- | src/include/gnunet_time_lib.h | 27 |
2 files changed, 27 insertions, 27 deletions
diff --git a/src/include/gnunet_fs_service.h b/src/include/gnunet_fs_service.h index 407c5d296..2987302a3 100644 --- a/src/include/gnunet_fs_service.h +++ b/src/include/gnunet_fs_service.h | |||
@@ -1630,33 +1630,6 @@ struct GNUNET_FS_BlockOptions | |||
1630 | 1630 | ||
1631 | 1631 | ||
1632 | /** | 1632 | /** |
1633 | * Return the current year (i.e. '2011'). | ||
1634 | */ | ||
1635 | unsigned int | ||
1636 | GNUNET_FS_get_current_year (void); | ||
1637 | |||
1638 | |||
1639 | /** | ||
1640 | * Convert a year to an expiration time of January 1st of that year. | ||
1641 | * | ||
1642 | * @param year a year (after 1970, please ;-)). | ||
1643 | * @return absolute time for January 1st of that year. | ||
1644 | */ | ||
1645 | struct GNUNET_TIME_Absolute | ||
1646 | GNUNET_FS_year_to_time (unsigned int year); | ||
1647 | |||
1648 | |||
1649 | /** | ||
1650 | * Convert an expiration time to the respective year (rounds) | ||
1651 | * | ||
1652 | * @param at absolute time | ||
1653 | * @return year a year (after 1970), 0 on error | ||
1654 | */ | ||
1655 | unsigned int | ||
1656 | GNUNET_FS_time_to_year (struct GNUNET_TIME_Absolute at); | ||
1657 | |||
1658 | |||
1659 | /** | ||
1660 | * Handle to the file-sharing service. | 1633 | * Handle to the file-sharing service. |
1661 | */ | 1634 | */ |
1662 | struct GNUNET_FS_Handle; | 1635 | struct GNUNET_FS_Handle; |
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 |