• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

samsmithnz / DotNetCensus / 4773330594

pending completion
4773330594

Pull #90

github

GitHub
Merge 6991c8b68 into 0b3e1d200
Pull Request #90: Code gardening

444 of 486 branches covered (91.36%)

Branch coverage included in aggregate %.

75 of 75 new or added lines in 9 files covered. (100.0%)

912 of 959 relevant lines covered (95.1%)

934.72 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

82.35
/src/DotNetCensus.Core/TimingHelper.cs
1
namespace DotNetCensus.Core
2
{
3
    public static class TimingHelper
4
    {
5
        public static string GetTime(TimeSpan timespan)
6
        {
16✔
7
            int mins = (int)timespan.TotalMinutes;
16✔
8
            int secs = (int)timespan.TotalSeconds - (mins * 60);
16✔
9
            int ms = (int)timespan.TotalMilliseconds - (secs * 1000) - (mins * 60 * 1000);
16✔
10
            if (mins > 0)
16!
11
            {
×
12
                return $"{mins.ToString()}:{secs.ToString("00")}.{ms.ToString("0")} mins";
×
13
            }
14
            else if (secs > 0)
16✔
15
            {
6✔
16
                return $"{secs.ToString("0")}.{ms.ToString("0")} seconds";
6✔
17
            }
18
            else
19
            {
10✔
20
                return $"{ms.ToString("0")} ms";
10✔
21
            }
22
        }
16✔
23
    }
24
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc