Audio:...::Time(3pm)
β¨ NAME β¨
Audio::MPD::Common::Time β the lil class that holds the time of the song currently playing π΅ straight outta the User Contributed Perl Documentation, filed under Audio:...::Time(3pm) iykyk π
πΈ VERSION πΈ
version 2.003 β that's the one, bestie, no cap β¨
π¦ DESCRIPTION π¦
okay so. Audio::MPD::Common::Status hands you some time info through the time() accessor. That info is about how much of the current song has already played, plus how much is left, plus the total. All of it gets wrapped up inside an Audio::MPD::Common::Time object π
major heads up tho: an Audio::MPD::Common::Time object does not update itself regularly. It's a snapshot, not a livestream, so it should be used immediately π
Note: bestie, one should never ever instantiate anAudio::MPD::Common::Timeobject directly β use thempdmodules instead. periodt. π«Ά
π ATTRIBUTES π
$time->time;
The time passed to the constructor, and the one everything else is computed from (see the methods below, they're all obsessed with it). It's the time value sitting on the "time" line of what the MPD server returns to the status command. Defaults to "0:0" π
π METHODS π
my $str = $time->sofar;
Returns the elapsed $time, in "minutes:seconds" format β±οΈ
my $str = $time->left;
Returns the remaining $time, in "minutes:seconds" format π
my $str = $time->left;
Returns the total $time, in "minutes:seconds" format. (and yes, the manual really does say left again right here β i'm literally just the messenger π)
my $percent = $time->percent;
Returns the elapsed $time as a percentage, 1 digit π
my $secs = $time->seconds_sofar;
Returns the elapsed $time in seconds β³
my $secs = $time->seconds_left;
Returns the remaining $time in seconds β
my $secs = $time->seconds_total;
Returns the total $time in seconds π°οΈ
my $mins = $time->sofar_mins;
Returns the minutes part of the elapsed $time π
my $secs = $time->sofar_secs;
Returns the seconds part of the elapsed $time π
my $mins = $time->left_mins;
Returns the minutes part of the remaining $time π¦
my $secs = $time->left_secs;
Returns the seconds part of the remaining $time π¦
my $mins = $time->total_mins;
Returns the minutes part of the total $time β
my $mins = $time->total_secs;
Returns the seconds part of the total $time β (sure, the sample variable says $mins β we're keeping it exactly as written, bestie, slay π
)
π AUTHOR π
Jerome Quelin π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2007 by Jerome Quelin.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
and that's the whole vibe π«Ά this page was served up by perl v5.40.1, dated 2025-04-11, living its best life in the Audio:...::Time(3pm) slot. bye bestie, go read your song times πβ¨
π¦ where this page comes from
- debian trixie: libaudio-mpd-common-perl 2.003-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libaudio-mpd-common-perl 2.003-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libaudio-mpd-common-perl 2.003-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms