Skip to content

Commit

Permalink
Change System.nanoTime to System.currentTimeMillis
Browse files Browse the repository at this point in the history
Signed-off-by: Sachin Kale <[email protected]>
  • Loading branch information
Sachin Kale committed Aug 19, 2024
1 parent 78f9594 commit 1ca00c9
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
import java.util.Optional;
import java.util.Set;
import java.util.TreeSet;
import java.util.concurrent.TimeUnit;
import java.util.function.Function;
import java.util.stream.Collectors;

Expand Down Expand Up @@ -502,7 +501,7 @@ public static List<String> filterOutMetadataFilesBasedOnAge(
Function<String, Long> getTimestampFunction,
TimeValue minimumAge
) {
long maxTimestampAllowed = TimeUnit.NANOSECONDS.toMillis(System.nanoTime()) - minimumAge.getMillis();
long maxTimestampAllowed = System.currentTimeMillis() - minimumAge.getMillis();
List<String> metadataFilesWithMinAge = new ArrayList<>();
for (String metadataFileName : metadataFiles) {
long metadataTimestamp = getTimestampFunction.apply(metadataFileName);
Expand Down

0 comments on commit 1ca00c9

Please sign in to comment.