$duration » History » Version 4
  Per Amundsen, 08/11/2015 01:54 PM 
  
| 1 | 1 | Per Amundsen | _Added in 1.8.10_  | 
|---|---|---|---|
| 2 | |||
| 3 | 2 | Per Amundsen | *$duration*  | 
| 4 | 1 | Per Amundsen | |
| 5 | Returns the duration of the currently playing song in milliseconds.  | 
||
| 6 | |||
| 7 | 3 | Per Amundsen | _AdiIRC only._  | 
| 8 | 1 | Per Amundsen | _Only works if Media Player is set to iTunes/MediaMonkey/Winamp and proper plugins are installed._  | 
| 9 | 2 | Per Amundsen | |
| 10 | |||
| 11 | *$duration(seconds,[N])*  | 
||
| 12 | |||
| 13 | Returns the specified number of seconds in a week/day/hour/minute/second format.  | 
||
| 14 | |||
| 15 | *Parameters*  | 
||
| 16 | |||
| 17 | 4 | Per Amundsen | seconds - Number of seconds or a [[$duration]] value to convert back into seconds.  | 
| 18 | 1 | Per Amundsen | N - If N = 2, the result does not include the seconds value. If N = 3, the result is in hh:nn:ss format.  | 
| 19 | 4 | Per Amundsen | |
| 20 | *Example*  | 
||
| 21 | |||
| 22 | <pre>  | 
||
| 23 | ; Print current date using $ctime.  | 
||
| 24 | //echo -ag $duration($ctime)  | 
||
| 25 | |||
| 26 | ; Do a reverse duration.  | 
||
| 27 | //echo -ag $duration(42wks 5days 11hrs 53mins 43secs)  | 
||
| 28 | </pre>  |