mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Fix idle timeout bug, use correct current time of day.
This commit is contained in:
parent
7affe44ee3
commit
662c0429b9
2 changed files with 4 additions and 4 deletions
|
|
@ -465,10 +465,10 @@ void
|
|||
_thread_kern_idle(void)
|
||||
{
|
||||
struct timespec ts;
|
||||
struct timeval tod, timeout;
|
||||
struct timeval timeout;
|
||||
|
||||
for (;;) {
|
||||
timersub(&_kern_idle_timeout, &tod, &timeout);
|
||||
timersub(&_kern_idle_timeout, &_sched_tod, &timeout);
|
||||
TIMEVAL_TO_TIMESPEC(&timeout, &ts);
|
||||
__sys_nanosleep(&ts, NULL);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -465,10 +465,10 @@ void
|
|||
_thread_kern_idle(void)
|
||||
{
|
||||
struct timespec ts;
|
||||
struct timeval tod, timeout;
|
||||
struct timeval timeout;
|
||||
|
||||
for (;;) {
|
||||
timersub(&_kern_idle_timeout, &tod, &timeout);
|
||||
timersub(&_kern_idle_timeout, &_sched_tod, &timeout);
|
||||
TIMEVAL_TO_TIMESPEC(&timeout, &ts);
|
||||
__sys_nanosleep(&ts, NULL);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue