$duration » History » Version 5
  Per Amundsen, 12/25/2018 07:26 AM 
  
| 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 | 5 | Per Amundsen | -----------------------------------------------------------------------------  | 
| 11 | 2 | Per Amundsen | |
| 12 | *$duration(seconds,[N])*  | 
||
| 13 | |||
| 14 | Returns the specified number of seconds in a week/day/hour/minute/second format.  | 
||
| 15 | |||
| 16 | *Parameters*  | 
||
| 17 | |||
| 18 | 4 | Per Amundsen | seconds - Number of seconds or a [[$duration]] value to convert back into seconds.  | 
| 19 | 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.  | 
| 20 | 4 | Per Amundsen | |
| 21 | *Example*  | 
||
| 22 | |||
| 23 | <pre>  | 
||
| 24 | ; Print current date using $ctime.  | 
||
| 25 | //echo -ag $duration($ctime)  | 
||
| 26 | |||
| 27 | ; Do a reverse duration.  | 
||
| 28 | //echo -ag $duration(42wks 5days 11hrs 53mins 43secs)  | 
||
| 29 | </pre>  |