$duration » History » Version 8
Per Amundsen, 02/16/2023 09:29 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 | 7 | 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 | 6 | Per Amundsen | _See also [[$ctime]], [[$asctime]], [[$gmt]]._ |
17 | |||
18 | 2 | Per Amundsen | *Parameters* |
19 | |||
20 | 8 | Per Amundsen | table(ktable). |
21 | |*Parameter*|*Description*| |
||
22 | | seconds | Number of seconds or a [[$duration]] value to convert back into seconds. | |
||
23 | | N | If N = 2, the result does not include the seconds value. If N = 3, the result is in hh:nn:ss format. | |
||
24 | 4 | Per Amundsen | |
25 | *Example* |
||
26 | |||
27 | <pre> |
||
28 | ; Print current date using $ctime. |
||
29 | //echo -ag $duration($ctime) |
||
30 | |||
31 | ; Do a reverse duration. |
||
32 | //echo -ag $duration(42wks 5days 11hrs 53mins 43secs) |
||
33 | </pre> |