Created
May 13, 2013 19:31
-
-
Save BinRoot/5570832 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private static long getNextTime(int timesPerDay) { | |
| ExponentialRandomVariable exponentialRandomVariable = new ExponentialRandomVariable(1.0/((double)timesPerDay)); | |
| double x = exponentialRandomVariable.nextRandomVariable(); | |
| long ms = (long)(x * 86400000); | |
| return ms; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment