3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-27 05:02:34 +01:00

Oops, add missing equation to moving average formula

This commit is contained in:
Pragmatic Software 2015-05-23 02:58:58 -07:00
parent 5b4fccb3f4
commit 7d3bf58d86

View File

@ -190,6 +190,7 @@ foreach my $answer (@valid_answers) {
$qdata->{last_correct_nick} = $nick;
if (gettimeofday - $qdata->{last_touched} < 60 * 5) {
$qdata->{average_answer_time} *= $qdata->{correct} - 1;
$qdata->{average_answer_time} += $elapsed;
$qdata->{average_answer_time} /= $qdata->{correct};
}