@@ -13,15 +13,10 @@ export enum TimeUnit {
1313 usec = 1000 ,
1414 msec = 1000000 ,
1515 sec = 1000000000 ,
16- secs = 1000000000 ,
1716 minute = 60000000000 ,
18- minutes = 60000000000 ,
1917 hour = 3600000000000 ,
20- hours = 3600000000000 ,
2118 day = 86400000000000 ,
22- days = 86400000000000 ,
23- week = 604800000000000 ,
24- weeks = 604800000000000
19+ week = 604800000000000
2520}
2621
2722/**
@@ -306,7 +301,7 @@ export class TimeValue {
306301 } else if ( this . seconds === Number . MAX_SAFE_INTEGER ) {
307302 buff . writeBigUInt64LE ( BigInt ( 0x7fffffffffffffffn ) , 0 ) ;
308303 } else {
309- const billion = BigInt ( TimeUnit . secs ) ;
304+ const billion = BigInt ( TimeUnit . sec ) ;
310305 const bigTime = BigInt ( this . nanoseconds ) + BigInt ( this . seconds ) * billion ;
311306
312307 // Ensure the TimeValue fits into a 64 unsigned integer.
@@ -327,7 +322,7 @@ export class TimeValue {
327322 * @param buffer A 64 bit unsigned integer. Little endian.
328323 */
329324 public static fromBinary ( buffer : Buffer ) : TimeValue {
330- const billion = BigInt ( TimeUnit . secs ) ;
325+ const billion = BigInt ( TimeUnit . sec ) ;
331326
332327 // To avoid overflow and floating point errors, work with BigInts.
333328 const bigTime = buffer . readBigUInt64LE ( 0 ) ;
@@ -362,7 +357,7 @@ export class TimeValue {
362357 throw new Error ( "Negative time values are illegal." ) ;
363358 }
364359
365- const billion = BigInt ( TimeUnit . secs ) ;
360+ const billion = BigInt ( TimeUnit . sec ) ;
366361
367362 // To avoid overflow and floating point errors, work with BigInts.
368363 const bigT = BigInt ( value ) * BigInt ( unit ) ;
0 commit comments