projects
/
oweals
/
dinit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4bd3733
)
Correct calculation of restart timeout, and up timeout to 200ms.
author
Davin McCall
<davmac@davmac.org>
Fri, 2 Jun 2017 17:49:13 +0000
(18:49 +0100)
committer
Davin McCall
<davmac@davmac.org>
Fri, 2 Jun 2017 17:49:13 +0000
(18:49 +0100)
src/service.cc
patch
|
blob
|
history
diff --git
a/src/service.cc
b/src/service.cc
index 08145e203983223a1553e61891884fa86ef13a27..69e8cbc5447f8649cdfa511b080fd6c68b114dfa 100644
(file)
--- a/
src/service.cc
+++ b/
src/service.cc
@@
-1191,14
+1191,14
@@
void base_process_service::restart_ps_process() noexcept
tdiff_ns = 1000000000 - (last_start_time.tv_nsec - current_time.tv_nsec);
}
- if (tdiff_s > 0 || tdiff_ns >
1
00000000) {
- // >
1
00ms
+ if (tdiff_s > 0 || tdiff_ns >
2
00000000) {
+ // >
2
00ms
start_ps_process();
}
else {
timespec timeout;
- timeout.tv_sec =
tdiff_s
;
- timeout.tv_nsec = tdiff_ns;
+ timeout.tv_sec =
0
;
+ timeout.tv_nsec =
200000000 -
tdiff_ns;
restart_timer.arm_timer_rel(eventLoop, timeout);
}
}