diff options
| author | Paul Buetow <paul@buetow.org> | 2008-05-26 22:14:52 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2008-05-26 22:14:52 +0000 |
| commit | 923b0503c91aa4a9c0bc94489caddf9ac94c5ad8 (patch) | |
| tree | 74bf4a51494085c9ecb107d3facc31bb585669b4 /sources/core/VSProcess.java | |
| parent | faee8241ff7972ceeb622e0793c655f301ef0bd0 (diff) | |
Two phase commit protocol works.
Diffstat (limited to 'sources/core/VSProcess.java')
| -rw-r--r-- | sources/core/VSProcess.java | 9 |
1 files changed, 9 insertions, 0 deletions
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 @@ -340,6 +340,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. * * @param add the clock offset to add. |
