projects
/
platform
/
core
/
appfw
/
aul-1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7610552
)
Use monotonic time
95/220595/2
author
Hwankyu Jhun
<h.jhun@samsung.com>
Thu, 19 Dec 2019 23:52:38 +0000
(08:52 +0900)
committer
Hwankyu Jhun
<h.jhun@samsung.com>
Fri, 20 Dec 2019 01:59:56 +0000
(10:59 +0900)
To measure launching time properly, we should use monotonic time.
Requires:
- https://review.tizen.org/gerrit/#/c/platform/core/appfw/aul-1/+/220595/
- https://review.tizen.org/gerrit/#/c/platform/core/appfw/amd/+/220598/
- https://review.tizen.org/gerrit/#/c/platform/core/appfw/launchpad/+/220600/
Change-Id: Ib4dcb78240a1f7d29001a673ca5e6d2074c02b92
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/launch.c
patch
|
blob
|
history
diff --git
a/src/launch.c
b/src/launch.c
index
98fe395
..
355debf
100755
(executable)
--- a/
src/launch.c
+++ b/
src/launch.c
@@
-178,11
+178,11
@@
static void __clear_internal_key(bundle *kb)
static inline void __set_stime(bundle *kb)
{
- struct time
val tv
;
+ struct time
spec start
;
char tmp[MAX_LOCAL_BUFSZ];
-
gettimeofday(&tv, NULL
);
- snprintf(tmp,
MAX_LOCAL_BUFSZ, "%ld/%ld", tv.tv_sec, tv.tv_u
sec);
+
clock_gettime(CLOCK_MONOTONIC, &start
);
+ snprintf(tmp,
sizeof(tmp), "%ld/%ld", start.tv_sec, start.tv_n
sec);
bundle_del(kb, AUL_K_STARTTIME);
bundle_add(kb, AUL_K_STARTTIME, tmp);
}