duration property

int get duration

The time (in milliseconds) that elapsed between this test starting and completing.

This will be -1 if this test was not completed.

Implementation

int get duration => endTime == -1 ? -1 : endTime - startTime;