projects
/
platform
/
upstream
/
connman.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge "Fix crash caused by decryption response delay" into tizen
[platform/upstream/connman.git]
/
src
/
util.c
diff --git
a/src/util.c
b/src/util.c
old mode 100644
(file)
new mode 100755
(executable)
index
732d451
..
03b14cd
--- a/
src/util.c
+++ b/
src/util.c
@@
-91,3
+91,14
@@
void __connman_util_cleanup(void)
f = -1;
}
+
+/**
+ * Return a random delay in range of zero to secs*1000 milli seconds.
+ */
+unsigned int __connman_util_random_delay_ms(unsigned int secs)
+{
+ uint64_t rand;
+
+ __connman_util_get_random(&rand);
+ return rand % (secs * 1000);
+}