diff options
author | Christian Grothoff <grothoff@gnunet.org> | 2022-03-26 07:17:12 +0100 |
---|---|---|
committer | Christian Grothoff <grothoff@gnunet.org> | 2022-03-26 07:17:32 +0100 |
commit | e598ffe0a3a3d3db0df1fcc04f52bbefe93d3779 (patch) | |
tree | 5aa6266185d790886d46ec8d4a5ff7b38a33cac2 /src/include | |
parent | 104473d4e270ca5979c79d540c9144bb72121a36 (diff) | |
download | gnunet-e598ffe0a3a3d3db0df1fcc04f52bbefe93d3779.tar.gz gnunet-e598ffe0a3a3d3db0df1fcc04f52bbefe93d3779.zip |
add GNUNET_TIME_absolute_round_down() function
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gnunet_time_lib.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/include/gnunet_time_lib.h b/src/include/gnunet_time_lib.h index 55af62b72..d59eb984d 100644 --- a/src/include/gnunet_time_lib.h +++ b/src/include/gnunet_time_lib.h | |||
@@ -482,6 +482,18 @@ GNUNET_TIME_absolute_max (struct GNUNET_TIME_Absolute t1, | |||
482 | 482 | ||
483 | 483 | ||
484 | /** | 484 | /** |
485 | * Round down absolute time @a at to multiple of @a rt. | ||
486 | * | ||
487 | * @param at absolute time to round | ||
488 | * @param rt multiple to round to (non-zero) | ||
489 | * @return rounded time | ||
490 | */ | ||
491 | struct GNUNET_TIME_Absolute | ||
492 | GNUNET_TIME_absolute_round_down (struct GNUNET_TIME_Absolute at, | ||
493 | struct GNUNET_TIME_Relative rt); | ||
494 | |||
495 | |||
496 | /** | ||
485 | * Return the maximum of two timestamps. | 497 | * Return the maximum of two timestamps. |
486 | * | 498 | * |
487 | * @param t1 first timestamp | 499 | * @param t1 first timestamp |