Skip to content

Suggested bug criterion: subtracting from currentTimeMillis()  #704

@abliss

Description

@abliss

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 .

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions