| 131 | } |
| 132 | |
| 133 | std::string Duration::ToString() const |
| 134 | { |
| 135 | std::ostringstream ss; |
| 136 | ss << std::fixed << std::setprecision(2) << _value.GetValue() << " " |
| 137 | << durationUnitToString(_unit); |
| 138 | if (!_value.IsFixedType()) { |
| 139 | ss << " [" << GetWeakVariableName(_value.GetVariable()) << "]"; |
| 140 | } |
| 141 | return ss.str(); |
| 142 | } |
| 143 | |
| 144 | // TODO: Remove the code below |
| 145 | // Only used for backwards compatibility |
no test coverage detected