mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=11453
This commit is contained in:
parent
0426903efc
commit
8f54ad0838
|
@ -12034,3 +12034,14 @@ David 2 Nov 2006
|
|||
|
||||
lib/
|
||||
prefs.C,h
|
||||
|
||||
David 2 Nov 2006
|
||||
- core client: get rid of attempts to keep track of
|
||||
network connected fraction,
|
||||
since we don't have a reliable way of seeing
|
||||
if there's a physical connection
|
||||
|
||||
client/
|
||||
time_stats.C
|
||||
lib/
|
||||
network.C
|
||||
|
|
|
@ -85,7 +85,12 @@ void TIME_STATS::update(bool is_active) {
|
|||
w1 = 1 - exp(-dt/ALPHA); // weight for recent period
|
||||
w2 = 1 - w1; // weight for everything before that
|
||||
// (close to zero if long gap)
|
||||
|
||||
// the following always returns UNKNOWN,
|
||||
// but leave it here for now
|
||||
//
|
||||
int connected_state = get_connected_state();
|
||||
|
||||
if (first) {
|
||||
// the client has just started; this is the first call.
|
||||
//
|
||||
|
@ -141,7 +146,7 @@ void TIME_STATS::update_cpu_efficiency(double cpu_wall_time, double cpu_time) {
|
|||
double w = exp(-cpu_wall_time/SECONDS_PER_DAY);
|
||||
double e = cpu_time/cpu_wall_time;
|
||||
if (e<0) {
|
||||
return;
|
||||
return;
|
||||
}
|
||||
cpu_efficiency = w*cpu_efficiency + (1-w)*e;
|
||||
if (log_flags.cpu_sched_debug){
|
||||
|
|
|
@ -182,7 +182,10 @@ int get_socket_error(int fd) {
|
|||
typedef BOOL (WINAPI *GetStateProc)( OUT LPDWORD lpdwFlags, IN DWORD dwReserved);
|
||||
typedef int (*pfnBOINCIsNetworkAlive)(LPDWORD lpdwFlags);
|
||||
|
||||
int get_connected_state( ) {
|
||||
int get_connected_state() {
|
||||
// The following is commented out because it causes
|
||||
// hangs in some situations.
|
||||
#if 0
|
||||
int online = 0;
|
||||
static bool first=true;
|
||||
static HMODULE lib_wininet_module;
|
||||
|
@ -217,6 +220,7 @@ int get_connected_state( ) {
|
|||
return CONNECTED_STATE_NOT_CONNECTED;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return CONNECTED_STATE_UNKNOWN;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue