diff options
Diffstat (limited to 'packages/taler-util/src/time.ts')
-rw-r--r-- | packages/taler-util/src/time.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/taler-util/src/time.ts b/packages/taler-util/src/time.ts index 46ed37637..c677d52ae 100644 --- a/packages/taler-util/src/time.ts +++ b/packages/taler-util/src/time.ts @@ -52,6 +52,10 @@ export interface TalerProtocolTimestamp { readonly _flavor?: typeof flavor_TalerProtocolTimestamp; } +/** + * Precise timestamp, typically used in the wallet-core + * API but not in other Taler APIs so far. + */ export interface TalerPreciseTimestamp { /** * Seconds (as integer) since epoch. @@ -88,7 +92,7 @@ export namespace TalerPreciseTimestamp { export function fromMilliseconds(ms: number): TalerPreciseTimestamp { return { t_s: Math.floor(ms / 1000), - off_us: Math.floor((ms - Math.floor(ms / 100) * 1000) * 1000), + off_us: Math.floor((ms - Math.floor(ms / 1000) * 1000) * 1000), }; } } |