From 923b0503c91aa4a9c0bc94489caddf9ac94c5ad8 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 26 May 2008 22:14:52 +0000 Subject: Two phase commit protocol works. --- sources/core/VSProcess.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'sources/core/VSProcess.java') diff --git a/sources/core/VSProcess.java b/sources/core/VSProcess.java index caa081f..03b980f 100644 --- a/sources/core/VSProcess.java +++ b/sources/core/VSProcess.java @@ -339,6 +339,15 @@ public class VSProcess extends VSPrefs { } } + /** + * Creates a random percentage 0..100 + * + * @return A random percentage 0..100 + */ + public synchronized int getRandomPercentage() { + return random.nextInt() % 101; + } + /** * Adds the clock offset. This method is used by the task manager. * -- cgit v1.2.3