durationAs - Convert duration to seconds, minutes, etc.by Group Public on Wednesday July 21 2010 @ 10:54:33 (1/1 Points) |
|
| API ↪Reference ✑ Reply ✓ Stick It ✗ Ditch It ⚐ Tag It |
When recording a Metric→ or otherwise reporting a period of elapsed time, the Duration→ type may need to be converted. The durationAs function enables these conversions.
set %Length% PT15M # 900000 ms set %Milliseconds% as durationAs ms %Length% # 900 seconds set %Seconds% as durationAs s %Length% # 15 minutes set %Minutes% as durationAs m %Length% # 0.25 hours set %Hours% as durationAs h %Length%
You should not use this function to do comparisons. Instead use the type correct durationComp→ function.
TestPlan durationAs - Convert duration to seconds, minutes, etc.
