From ac8f116780a860c8f4acfdf5553bf90d76afe236 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 9 Aug 2022 15:00:45 +0200 Subject: implement peer to peer push payments --- packages/taler-util/src/time.ts | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'packages/taler-util/src/time.ts') diff --git a/packages/taler-util/src/time.ts b/packages/taler-util/src/time.ts index 8b0516bf8..0ba684beb 100644 --- a/packages/taler-util/src/time.ts +++ b/packages/taler-util/src/time.ts @@ -92,6 +92,14 @@ export namespace Duration { return { d_ms: deadline.t_ms - now.t_ms }; } + export function max(d1: Duration, d2: Duration): Duration { + return durationMax(d1, d2); + } + + export function min(d1: Duration, d2: Duration): Duration { + return durationMin(d1, d2); + } + export function toIntegerYears(d: Duration): number { if (typeof d.d_ms !== "number") { throw Error("infinite duration"); -- cgit v1.2.3