Skip to content

Commit

Permalink
Polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrannen committed Aug 9, 2019
1 parent 9774510 commit 56c1e8f
Showing 1 changed file with 2 additions and 3 deletions.
Expand Up @@ -16,12 +16,11 @@

package org.springframework.util;

import java.util.concurrent.TimeUnit;

import org.junit.Test;

import org.springframework.util.StopWatch.TaskInfo;

import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
Expand Down Expand Up @@ -141,7 +140,7 @@ public void validUsageDoesNotKeepTaskList() throws Exception {
}

private static long millisToNanos(long duration) {
return TimeUnit.NANOSECONDS.convert(duration, TimeUnit.MILLISECONDS);
return MILLISECONDS.toNanos(duration);
}

}

0 comments on commit 56c1e8f

Please sign in to comment.