diff options
author | Florian Dold <florian@dold.me> | 2022-09-05 18:12:30 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-09-13 16:10:41 +0200 |
commit | 13e7a674778754c0ed641dfd428e3d6b2b71ab2d (patch) | |
tree | f2a0e5029305a9b818416fd94908ef77cdd7446f /packages/taler-util/src/time.ts | |
parent | f9f2911c761af1c8ed1c323dcd414cbaa9eeae7c (diff) | |
download | wallet-core-13e7a674778754c0ed641dfd428e3d6b2b71ab2d.tar.xz |
wallet-core: uniform retry handling
Diffstat (limited to 'packages/taler-util/src/time.ts')
-rw-r--r-- | packages/taler-util/src/time.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/taler-util/src/time.ts b/packages/taler-util/src/time.ts index 9c25af400..1e79b943b 100644 --- a/packages/taler-util/src/time.ts +++ b/packages/taler-util/src/time.ts @@ -100,6 +100,10 @@ export namespace Duration { return durationMin(d1, d2); } + export function multiply(d1: Duration, n: number): Duration { + return durationMul(d1, n); + } + export function toIntegerYears(d: Duration): number { if (typeof d.d_ms !== "number") { throw Error("infinite duration"); @@ -357,7 +361,6 @@ export const codecForAbsoluteTime: Codec<AbsoluteTime> = { }, }; - export const codecForTimestamp: Codec<TalerProtocolTimestamp> = { decode(x: any, c?: Context): TalerProtocolTimestamp { // Compatibility, should be removed soon. |