Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package ServicePkg;
- import java.util.Date;
- import java.util.Random;
- public class Utils {
- public static final int minServiceTime = 300;
- public static final int maxServiceTime = 600;
- public static final int minTimeToNextCustomer = 100;
- public static final int maxTimeToNextCustomer = 200;
- private static Random rnd = new Random();
- public static void printLog(String logMessage) {
- System.out.println((new Date()).getTime() + " : " + logMessage);
- }
- public static int getRandomServiceTime() {
- return minServiceTime
- + rnd.nextInt(maxServiceTime - minServiceTime + 1);
- }
- public static int getRandomTimeToNextCustomer() {
- return minTimeToNextCustomer
- + rnd.nextInt(maxTimeToNextCustomer - minTimeToNextCustomer + 1);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement