Skip to content

Commit 5746ce3

Browse files
authored
Update README.md
1 parent dc82acb commit 5746ce3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,10 @@ Example output:
5151
| Total: 353.98m |
5252
--------------------------------------------------------------------------------
5353
```
54+
55+
## Limitations
56+
This project is utilizing `System.nanoTime()` which has some inherent issues with very quick task times. It does have a nanosecond resolution, but not a nanosecond precision. These are still usually orders of magnitude away from what you are trying to measure, so it is not a problem. If you are micro-benchmarking, consider using a framework like [JMH](https://mvnrepository.com/artifact/org.openjdk.jmh/jmh-core)
57+
58+
If you would like to know more:
59+
* https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/System.html#nanoTime()
60+
* https://shipilev.net/blog/2014/nanotrusting-nanotime/#_timers

0 commit comments

Comments
 (0)