LLVM 20.0.0git
|
Implementation of format_provider<T> for duration types. More...
#include "llvm/Support/Chrono.h"
Static Public Member Functions | |
static void | format (const Dur &D, llvm::raw_ostream &Stream, StringRef Style) |
Implementation of format_provider<T> for duration types.
The options string of a duration type has the grammar:
duration_options ::= [unit][show_unit [number_options]] unit ::= h
|m
|s
|ms|
us|
ns show_unit ::=
+|
-` number_options ::= options string for a integral or floating point type
| "" | 1s | 1 s | | "ms" | 1s | 1000 ms | | "ms-" | 1s | 1000 | | "ms-n" | 1s | 1,000 |
If the unit of the duration type is not one of the units specified above, it is still possible to format it, provided you explicitly request a display unit or you request that the unit is not displayed.
|
inlinestatic |
Definition at line 181 of file Chrono.h.
References assert(), llvm::count(), D, and llvm::StringRef::empty().