Skip to content

Commit

Permalink
refactor: use Date.now()
Browse files Browse the repository at this point in the history
  • Loading branch information
nicklasl committed Nov 29, 2024
1 parent 647a106 commit 4b7ff60
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/sdk/src/FlagResolverClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export class FetchingFlagResolverClient implements FlagResolverClient {
this.resolveTimeout,
new ResolveError('TIMEOUT', 'Resolve timeout'),
);
const start = new Date().getTime();
const start = Date.now();
return this.resolveFlagsJson(request, signalWithTimeout)
.then(response => FlagResolution.ready(context, response, this.createApplier(response.resolveToken)))
.catch(error => {
Expand All @@ -165,7 +165,7 @@ export class FetchingFlagResolverClient implements FlagResolverClient {
throw error;
})
.finally(() => {
this.markLatency(new Date().getTime() - start);
this.markLatency(Date.now() - start);
});
});
}
Expand Down

0 comments on commit 4b7ff60

Please sign in to comment.