Thanks to visit codestin.com
Credit goes to github.com

Skip to content

rate.sleep will sometimes return slightly early from a sleep #190

Description

@tfoote

I was working on the unit tests with @gerkey for rate.sleep and expected the sleep to not return before expected.

On repeated runs it had a jitter on the order of 10us. (The printout is in nanoseconds. and the expected duration is 100 ms

Console output of observed delta: https://gist.github.com/tfoote/0ec473b38bc517d12779

We added an epsilon to the unit tests for now (#182), but we should review our code to make it as consistent as with the assumptions of developers who are used to calling the standard sleep methods.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions