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

Normal distribution API seems broken #2

Closed
egorse opened this issue May 20, 2019 · 4 comments
Closed

Normal distribution API seems broken #2

egorse opened this issue May 20, 2019 · 4 comments

Comments

@egorse
Copy link

egorse commented May 20, 2019

Next code generates delay of minutes instead of second +-

package main

import (
	"fmt"
	"time"

	"github.com/lthibault/jitterbug"
)

func main() {
	j1 := jitterbug.Norm{Stdev: time.Nanosecond * 100}
	d1 := j1.Jitter(1 * time.Second)
	fmt.Printf("%v\n", d1)
}
@lthibault
Copy link
Owner

Hi @egorse thanks for bringing this up.

If you have a fix, I can take a look at it today and get it merged quickly. If not, it may take a while to get to it.

Cheers,
Louis

lthibault added a commit that referenced this issue May 20, 2019
@lthibault
Copy link
Owner

@egorse Many thanks for the patch.

Out of curiosity, what is your use-case for jitterbug?

@egorse
Copy link
Author

egorse commented Dec 10, 2019

@lthibault we were trying to replicate rare problems one of customers has with PTP and tried to insert jitter to see how the control loop behave. sorry for late reply

@lthibault
Copy link
Owner

@egorse No worries, thanks for the feedback. I hope this library was helpful in solving the problem.

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

2 participants