Skip to content

Commit 2cf7be3

Browse files
committed
rfc23: add "ms" suffix to Flux Standard Duration
Problem: The Flux Standard Duration specification only allows a unit suffix of "s" (seconds) or greater, but there are times when it would be convenient to represent a duration in milliseconds (ms), especially when converting a small duration into FSD. Add an "ms" suffix to the FSD spec. Reword the specification to allow for string suffixes instead of only a single character suffix.
1 parent 0a17a29 commit 2cf7be3

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

spec_23.rst

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,14 @@ said to support "Flux Standard Duration."
3939
Implementation
4040
--------------
4141

42-
A duration in Flux Standard Duration SHALL be of the form ``N[SUFFIX]`` where
43-
``SUFFIX`` SHALL be optional and, if provided, MUST be a single character from the
44-
set ``s,m,h,d``. The value ``N`` MUST be a non-negative, non-infinite,
45-
floating-point number excluding ``NaN``. The value ``N`` SHALL be in one of the
46-
forms allowed by C99 [#f1]_ ``strtof`` or ``strtod`` and SHALL be interpreted as:
42+
A duration in Flux Standard Duration SHALL be of the form ``N[SUFFIX]``
43+
where ``SUFFIX`` SHALL be optional and, if provided, MUST be a string from
44+
the set { ``ms``, ``s``, ``m``, ``h``, ``d`` }. The value ``N`` MUST be a
45+
non-negative, non-infinite, floating-point number excluding ``NaN``. The
46+
value ``N`` SHALL be in one of the forms allowed by C99 [#f1]_ ``strtof``
47+
or ``strtod`` and SHALL be interpreted as:
48+
49+
- *milliseconds* if ``SUFFIX`` is ``ms``.
4750

4851
- *seconds* if ``SUFFIX`` is not provided, or is ``s``.
4952

0 commit comments

Comments
 (0)