Skip to content

Commit

Permalink
refactor: remove extra factory fn for clock
Browse files Browse the repository at this point in the history
  • Loading branch information
kwasniew committed Jan 13, 2025
1 parent 8feee0d commit 9e26793
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ export class UniqueConnectionService {
return { previous: previousHll.count(), current: currentHll.count() };
}

async sync(clock = new Date()): Promise<void> {
async sync(currentTime = new Date()): Promise<void> {
if (!this.flagResolver.isEnabled('uniqueSdkTracking')) return;

const currentHour = clock.getHours();
const currentHour = currentTime.getHours();
const currentBucket = await this.uniqueConnectionStore.get('current');

if (this.activeHour !== currentHour && currentBucket) {
Expand Down

0 comments on commit 9e26793

Please sign in to comment.