Skip to content

Commit

Permalink
use clock from underlying meter
Browse files Browse the repository at this point in the history
  • Loading branch information
brharrington committed Jan 29, 2024
1 parent fad87fa commit bfa1eea
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
*/
class DefaultPlaceholderTimer extends AbstractDefaultPlaceholderMeter<Timer> implements Timer {

private final Clock clock;

/**
* Constructs a new timer with the specified dynamic id.
*
Expand All @@ -38,12 +36,11 @@ class DefaultPlaceholderTimer extends AbstractDefaultPlaceholderMeter<Timer> imp
*/
DefaultPlaceholderTimer(PlaceholderId id, Registry registry) {
super(id, registry::timer);
this.clock = registry.clock();
}

@Override
public Clock clock() {
return clock;
return resolveToCurrentMeter().clock();
}

@Override
Expand Down

0 comments on commit bfa1eea

Please sign in to comment.