Skip to content

Commit

Permalink
fixed metrics millis
Browse files Browse the repository at this point in the history
  • Loading branch information
paolocappelletti committed Apr 9, 2024
1 parent cb2dedf commit 78d90e8
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions sdk/src/main/java/io/horizen/metrics/MetricsManager.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
package io.horizen.metrics;

import io.horizen.block.SidechainBlockBase;
import io.horizen.block.SidechainBlockBase$;
import io.prometheus.metrics.core.metrics.Counter;
import io.prometheus.metrics.core.metrics.Gauge;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import sparkz.core.utils.NetworkTimeProvider;
import sparkz.core.utils.TimeProvider;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -74,13 +70,9 @@ private MetricsManager(TimeProvider timeProvider) throws IOException {
}

public long currentMillis(){
return timeProvider.time()/1000;
}
public long computeMillis(long startMillis){
return timeProvider.time()/1000 - startMillis;
return timeProvider.time();
}


public List<MetricsHelp> getHelp(){
return helps;
}
Expand Down

0 comments on commit 78d90e8

Please sign in to comment.