Suggested bug criterion: subtracting from currentTimeMillis()
Open
Type-NewCheck
- Dominant language
- Java
- Stars
- 7.2k
- Forks
- 820
- Avg merge
- 5h 9m
- Merged PRs (30d)
- 50
Description
If a programmer stores System.currentTimeMillis() in a local variable, then later subtracts that variable from currentTimeMillis(), it is almost certainly incorrect (they should probably be using nanoTime()). This seems like it might match the https://github.com/google/error-prone/wiki/Criteria-for-new-checks .
Contributor guide
Assessment
This issue has not been assessed yet.