diff options
Diffstat (limited to 'src/util/time.c')
-rw-r--r-- | src/util/time.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/util/time.c b/src/util/time.c index 83b39b4e8..68a6937a0 100644 --- a/src/util/time.c +++ b/src/util/time.c | |||
@@ -695,6 +695,13 @@ GNUNET_TIME_timestamp_from_s (uint64_t s_after_epoch) | |||
695 | } | 695 | } |
696 | 696 | ||
697 | 697 | ||
698 | uint64_t | ||
699 | GNUNET_TIME_timestamp_to_s (struct GNUNET_TIME_Timestamp ts) | ||
700 | { | ||
701 | return ts.abs_time.abs_value_us / GNUNET_TIME_UNIT_SECONDS.rel_value_us; | ||
702 | } | ||
703 | |||
704 | |||
698 | struct GNUNET_TIME_Absolute | 705 | struct GNUNET_TIME_Absolute |
699 | GNUNET_TIME_absolute_ntoh (struct GNUNET_TIME_AbsoluteNBO a) | 706 | GNUNET_TIME_absolute_ntoh (struct GNUNET_TIME_AbsoluteNBO a) |
700 | { | 707 | { |