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

Calculate travel_offset to align with the precision of argument to Timecop.travel #421

Merged

Commits on Jun 27, 2024

  1. Calculate travel_offset to align with clock precision

    Subtracting two `Time`s returns a `Float`, which may not be accurate
    down to subsecond resolution. Because `Float`s are stored as double-
    precision values (IEEE 754), they can have resolutions much higher than
    the typical minimum clock precision of 10e-9 seconds. Which can result
    in two `Time` object not comparing as equal when they are the same down
    to the nanosecond, when one has had a travel_offset applied to it.
    dgholz committed Jun 27, 2024
    Configuration menu
    Copy the full SHA
    f9abed9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    14e0f8f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    96b239e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8a5d52d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c2bdfc7 View commit details
    Browse the repository at this point in the history