mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-26 13:59:47 +01:00
Show fractional seconds; use concise duration
This commit is contained in:
parent
41cc190f2a
commit
afad192b83
@ -4,7 +4,7 @@ use warnings;
|
||||
use strict;
|
||||
|
||||
use Time::HiRes qw(gettimeofday);
|
||||
use Time::Duration qw(duration);
|
||||
use Time::Duration qw(concise duration);
|
||||
|
||||
use Scorekeeper;
|
||||
use IRCColors;
|
||||
@ -112,7 +112,11 @@ sub sort_quickeststreak {
|
||||
sub print_quickeststreak {
|
||||
my $player = shift @_;
|
||||
return undef if $player->{lifetime_highest_quick_correct_streak} == 0;
|
||||
return "$player->{nick}: $player->{lifetime_highest_quick_correct_streak} in " . duration $player->{lifetime_quickest_correct_streak};
|
||||
if ($player->{lifetime_quickest_correct_streak} < 60) {
|
||||
return "$player->{nick}: $player->{lifetime_highest_quick_correct_streak} in " . sprintf("%.2fs", $player->{lifetime_quickest_correct_streak});
|
||||
} else {
|
||||
return "$player->{nick}: $player->{lifetime_highest_quick_correct_streak} in " . concise duration $player->{lifetime_quickest_correct_streak};
|
||||
}
|
||||
}
|
||||
|
||||
sub sort_wrongstreak {
|
||||
|
Loading…
Reference in New Issue
Block a user