[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated: fix floor in times
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated: fix floor in times |
Date: |
Mon, 05 Jun 2023 16:24:32 +0200 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a commit to branch master
in repository wallet-core.
The following commit(s) were added to refs/heads/master by this push:
new 6e7c88a62 fix floor in times
6e7c88a62 is described below
commit 6e7c88a62073082b28ef563561d08f56acc0b017
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Mon Jun 5 11:24:25 2023 -0300
fix floor in times
---
packages/taler-util/src/time.ts | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/packages/taler-util/src/time.ts b/packages/taler-util/src/time.ts
index 717da7ecd..3d7d80485 100644
--- a/packages/taler-util/src/time.ts
+++ b/packages/taler-util/src/time.ts
@@ -81,7 +81,7 @@ export namespace TalerPreciseTimestamp {
export function fromSeconds(s: number): TalerPreciseTimestamp {
return {
t_s: Math.floor(s),
- off_us: (s - Math.floor(s)) / 1000 / 1000,
+ off_us: Math.floor((s - Math.floor(s)) / 1000 / 1000),
};
}
@@ -89,7 +89,7 @@ export namespace TalerPreciseTimestamp {
return {
t_s: Math.floor(ms / 1000),
off_us: Math.floor((ms - Math.floor(ms / 100) * 1000) * 1000),
- }
+ };
}
}
@@ -254,7 +254,7 @@ export namespace Duration {
};
}
return {
- d_ms: d.d_us / 1000,
+ d_ms: Math.floor(d.d_us / 1000),
};
}
@@ -371,7 +371,7 @@ export namespace AbsoluteTime {
}
const offsetUs = t.off_us ?? 0;
return {
- t_ms: t.t_s * 1000 + offsetUs / 1000,
+ t_ms: t.t_s * 1000 + Math.floor(offsetUs / 1000),
[opaque_AbsoluteTime]: true,
};
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-wallet-core] branch master updated: fix floor in times,
gnunet <=