projects
/
platform
/
core
/
appfw
/
shortcut.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
abf3f13
)
Try to use gettimeofday if clock_gettime is failed
author
Sung-jae Park
<nicesj.park@samsung.com>
Thu, 26 Sep 2013 03:37:30 +0000
(12:37 +0900)
committer
Sung-jae Park
<nicesj.park@samsung.com>
Thu, 26 Sep 2013 03:37:30 +0000
(12:37 +0900)
Change-Id: Ib4475943c798bff990259eac364f55acc5d0a79d
lib/src/icon.c
patch
|
blob
|
history
diff --git
a/lib/src/icon.c
b/lib/src/icon.c
index
06877fc
..
45199ce
100644
(file)
--- a/
lib/src/icon.c
+++ b/
lib/src/icon.c
@@
-713,7
+713,14
@@
EAPI int shortcut_icon_request_send(struct shortcut_icon *handle, int size_type,
if (s_info.type == CLOCK_MONOTONIC) {
s_info.type = CLOCK_REALTIME;
} else if (s_info.type == CLOCK_REALTIME) {
- tv = rand();
+ struct timeval _tv;
+ if (gettimeofday(&_tv, NULL) < 0) {
+ ErrPrint("gettimeofday: %s\n", strerror(errno));
+ _tv.tv_sec = rand();
+ _tv.tv_usec = rand();
+ }
+
+ tv = (double)_tv.tv_sec + (double)_tv.tv_usec / 1000000.0f;
break;
}
} while (1);