aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_time_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_time_lib.h')
-rw-r--r--src/include/gnunet_time_lib.h42
1 files changed, 40 insertions, 2 deletions
diff --git a/src/include/gnunet_time_lib.h b/src/include/gnunet_time_lib.h
index b9e87fcbe..bddf5c6bf 100644
--- a/src/include/gnunet_time_lib.h
+++ b/src/include/gnunet_time_lib.h
@@ -530,6 +530,44 @@ GNUNET_TIME_absolute_hton (struct GNUNET_TIME_Absolute a);
530 530
531 531
532/** 532/**
533 * Convert milliseconds after the UNIX epoch to absolute time.
534 *
535 * @param ms_after_epoch millisecond timestamp to convert
536 * @return converted time value
537 */
538struct GNUNET_TIME_Absolute
539GNUNET_TIME_absolute_from_ms (uint64_t ms_after_epoch);
540
541
542/**
543 * Test if @a abs is never.
544 *
545 * @return true if it is.
546 */
547bool
548GNUNET_TIME_absolute_is_never (struct GNUNET_TIME_Absolute abs);
549
550
551/**
552 * Test if @a rel is forever.
553 *
554 * @return true if it is.
555 */
556bool
557GNUNET_TIME_relative_is_forever (struct GNUNET_TIME_Relative rel);
558
559
560/**
561 * Convert seconds after the UNIX epoch to absolute time.
562 *
563 * @param s_after_epoch seconds after epoch to convert
564 * @return converted time value
565 */
566struct GNUNET_TIME_Absolute
567GNUNET_TIME_absolute_from_s (uint64_t s_after_epoch);
568
569
570/**
533 * Convert absolute time from network byte order. 571 * Convert absolute time from network byte order.
534 * 572 *
535 * @param a time to convert 573 * @param a time to convert
@@ -609,8 +647,8 @@ struct GNUNET_CONFIGURATION_Handle;
609 * @return monotonically increasing time 647 * @return monotonically increasing time
610 */ 648 */
611struct GNUNET_TIME_Absolute 649struct GNUNET_TIME_Absolute
612GNUNET_TIME_absolute_get_monotonic (const struct 650GNUNET_TIME_absolute_get_monotonic (
613 GNUNET_CONFIGURATION_Handle *cfg); 651 const struct GNUNET_CONFIGURATION_Handle *cfg);
614 652
615 653
616#if 0 /* keep Emacsens' auto-indent happy */ 654#if 0 /* keep Emacsens' auto-indent happy */