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

add a randomized delay macro to eunit #23

Open
richcarl opened this issue Jul 7, 2012 · 0 comments
Open

add a randomized delay macro to eunit #23

richcarl opened this issue Jul 7, 2012 · 0 comments

Comments

@richcarl
Copy link
Owner

richcarl commented Jul 7, 2012

It could be quite useful to have a macro that can insert random delays in a program, when testing is enabled. It should take both minimum and maximum delay times (in seconds) and a probability threshold for a delay to occur at all. For example:

?randomDelay(0.25, 1.0, 5.0)

would mean that when this code runs, if testing is enabled, there is a 25% chance that the process will be suspended, for a random time between 1.0 and 5.0 seconds.

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

No branches or pull requests

1 participant