AutoGen - The Automated Program Generator: 7.4.6.11 Arg Type Time Duration

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

#### 7.4.6.11 Arg Type Time Duration

`arg-type = time;`

The argument will be converted into a number of seconds. It may be a multi-part number with different parts being multiplied into a seconds value and added into the final result. Valid forms are in the table below. Upper cased letters represent numbers that must be used in the expressions.

‘`[[HH:]MM:]SS`’

  where the hyphens (`-`) are really colons(`:`), but the texi doc system won't allow colons there.

  `HH` is multiplied by `3600` and `MM` multiplied by `60` before they are added to `SS`. This time specification may not be followed by any other time specs. `HH` and `MM` are both optional, though `HH` cannot be specified without `MM`.

‘`DAYS d`’

  `DAYS` is multiplied by the number of seconds in a day. This value may be followed by (and added to) values specified by `HH:MM:SS` or the suffixed values below. If present, it must always be first.

‘`HRS h`’

  `HRS` is multiplied by the number of seconds in an hour. This value may be followed by (and added to) values specified by `MM:SS` or the suffixed values below.

‘`MINS m`’

  `MINS` is multiplied by the number of seconds in a minute. This value may be followed by (and added to) a count of seconds.

‘`SECS s`’

  This value can only be the last value in a time specification. The `s` suffix is optional.

       5 d 1:10:05    ==> 5 days + 1 hour 10 minutes and 5 seconds
       5 d 1 h 10 m 5 ==> yields: 436205 seconds
       5d1h10m5s      ==> same result -- spaces are optional.

When saved into a config file, the value will be stored as a simple count of seconds. There are actually more (many) accepted time duration strings. The full documentation can be found with ISO-8601 documentation and the more extedded documentation when “parse_duration()” becomes more widely available.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

This document was generated by Bruce Korb on May, 16 2009 using texi2html 1.78.