Audio::MPD::Common::Time(3pm)

Audio::MPD::Common::Time3pm

Class representing time of current song

Version

version 2.003

Overview

Audio::MPD::Common::Status returns some time information with the time() accessor. This information relates to the elapsed time of the current song, as well as the remaining and total time. This information is encapsulated in an Audio::MPD::Common::Time object.

An Audio::MPD::Common::Time object does not update itself regularly, and thus should be used immediately.

Note: one should never ever instantiate an Audio::MPD::Common::Time object directly - use the mpd modules instead.

Attributes

$time->time;

The time passed to the constructor, used to compute all others values (see methods). It is the time value (on the "time" line) of what the MPD server returns to the status command. Defaults to "0:0".

Methods

my $str = $time->sofar;

Return elapsed $time ("minutes:seconds" format).

my $str = $time->left;

Return remaining $time ("minutes:seconds" format).

my $str = $time->left;

Return total $time ("minutes:seconds" format).

my $percent = $time->percent;

Return elapsed $time (percentage, 1 digit).

my $secs = $time->seconds_sofar;

Return elapsed $time in seconds.

my $secs = $time->seconds_left;

Return remaining $time in seconds.

my $secs = $time->seconds_total;

Return total $time in seconds.

my $mins = $time->sofar_mins;

Return minutes part of elapsed $time.

my $secs = $time->sofar_secs;

Return seconds part of elapsed $time.

my $mins = $time->left_mins;

Return minutes part of remaining $time.

my $secs = $time->left_secs;

Return seconds part of remaining $time.

my $mins = $time->total_mins;

Return minutes part of total $time.

my $mins = $time->total_secs;

Return seconds part of total $time.

Releases

9 releases since Debian 5.0 (Lenny); the text changed 7 times.

  1. 5.0
  2. 6.0
  3. 7
  4. 8
  5. 9
  6. 10–11
  7. 12
  8. 13

Author

Jerome Quelin

From libaudio-mpd-common-perl 2.003-4 in Debian 13 (Trixie). Parsed by carta from the page's man source.