Fix for NaN coming in time attribute when test fails.
Merge pull request #1039 from vnikiti/xunit-sonar-fix

Fix for NaN coming in time attribute when test fails.

* vnikiti/xunit-sonar-fix:
  Fix for NaN coming in time attribute when test fails.