Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Duration equals and compareTo when values differ by very little #33

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Jul 4, 2023

  1. Test Duration.compareTo

    findepi committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    e762bdf View commit details
    Browse the repository at this point in the history
  2. Fix Duration.compareTo for sub-millis differences

    Comparing by `getValue(MILLISECONDS)` is not sufficient to distinguish
    shorter durations, or duration with difference smaller than
    milliseconds. Additionally, this changes `getValue` itself.
    Multiplication with `millisPerTimeUnit` division was introducing
    additional double math error, so was replaced with as direct as possible
    calculation.
    findepi committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    0b93efc View commit details
    Browse the repository at this point in the history