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

Change delay to be time based with milliseconds #1

Open
RIAEvangelist opened this issue Jan 4, 2021 · 1 comment
Open

Change delay to be time based with milliseconds #1

RIAEvangelist opened this issue Jan 4, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@RIAEvangelist
Copy link
Owner

This is the code I made for another project. This note is either for me or anyone that wants to :

  1. replace the delay function
  2. update the docs
  3. update the examples
const delay=function(ms=100){
    const end = Date.now()+ms;
    while(Date.now()<end){
        //wait
    }
    return true;
}
@RIAEvangelist RIAEvangelist added the enhancement New feature or request label Apr 14, 2021
@RIAEvangelist
Copy link
Owner Author

Delay should just use the wait module

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant