diff options
author | treeston <treeston.mmoc@gmail.com> | 2015-11-28 19:21:33 +0100 |
---|---|---|
committer | treeston <treeston.mmoc@gmail.com> | 2015-11-28 23:53:04 +0100 |
commit | c0faee079542c134925025a3c32c9324e750dfaa (patch) | |
tree | 2e76557d613fd2b41c4d46dc99ca5dfa22a88da3 /src/common/Utilities/Util.h | |
parent | e266278f7d029f1547b1ae3228d658463c69da09 (diff) |
Core/Util: Add a urandms(min,max) helper to make urand(min*IN_MILLISECONDS, max*IN_MILLISECONDS) shorter to write for random time intervals (boss scripts).
Diffstat (limited to 'src/common/Utilities/Util.h')
-rw-r--r-- | src/common/Utilities/Util.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/Utilities/Util.h b/src/common/Utilities/Util.h index 6a872b44a60..b748e83408b 100644 --- a/src/common/Utilities/Util.h +++ b/src/common/Utilities/Util.h @@ -82,6 +82,9 @@ int32 irand(int32 min, int32 max); /* Return a random number in the range min..max (inclusive). */ uint32 urand(uint32 min, uint32 max); +/* Return a random millisecond value between min and max seconds. Functionally equivalent to urand(min*IN_MILLISECONDS, max*IN_MILLISECONDS). */ +uint32 urandms(uint32 min, uint32 max); + /* Return a random number in the range 0 .. UINT32_MAX. */ uint32 rand32(); |