0.000001) { $avg += (1.0-$weight)*($work/$diff_days); } else { $avg += M_LN2*$work*86400/CREDIT_HALF_LIFE; } } else if ($work) { $dd = ($now - $work_start_time)/86400; $avg = $work/$dd; } $avg_time = $now; } ?>