You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2022/06/09 02:19:52 UTC

[GitHub] [geode] nabarunnag commented on a diff in pull request #7779: GEODE-6504: Instant class used.

nabarunnag commented on code in PR #7779:
URL: https://github.com/apache/geode/pull/7779#discussion_r893011483


##########
geode-core/src/integrationTest/java/org/apache/geode/cache/RegionExpirationIntegrationTest.java:
##########
@@ -70,10 +71,10 @@ public void setUp() {
   }
 
   @Test
-  public void increaseRegionTtl() throws Exception {
+  public void increaseRegionTtl() {
     int firstTtlSeconds = 3;
     int secondTtlSeconds = 8;
-    long startNanos = nanoTime();
+    Instant startInstant = Instant.now();

Review Comment:
   its in the javadocs and lot of blogs: 
   
   > Another pitfall with nanoTime() is that even though it provides nanosecond precision, it doesn't guarantee nanosecond resolution (i.e. how often the value is updated).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org