Fixed issue that caused the server to fall asleep too early
This commit is contained in:
parent
3556d6eb5c
commit
82edabae45
@ -1,12 +1,12 @@
|
||||
#include "Idler.h"
|
||||
#include <iostream>
|
||||
#define TIME_TO_FALL_ASLEEP MINUTES(5)
|
||||
#define TIME_TO_FALL_ASLEEP MINUTES(3)
|
||||
#define SLEEP_TIME SECONDS(3)
|
||||
|
||||
void Idler::Update()
|
||||
{
|
||||
// Has no request been made within 3 minutes?
|
||||
if (time(0) - XGControl::last_query_time > 10)
|
||||
// Has no request been made within x minutes?
|
||||
if (time(0) - XGControl::last_query_time > TIME_TO_FALL_ASLEEP)
|
||||
{
|
||||
// Let the processor chill for a second.
|
||||
// This should reduce the idling-cpu load to near 0%
|
||||
|
@ -1,2 +1,2 @@
|
||||
#pragma once
|
||||
#define TUBIO_SERVER_VERSION (0.536)
|
||||
#define TUBIO_SERVER_VERSION (0.537)
|
||||
|
Loading…
x
Reference in New Issue
Block a user