Skip to content

Commit

Permalink
Override TimeDuration.ToString()
Browse files Browse the repository at this point in the history
  • Loading branch information
ScrubN committed Jul 6, 2024
1 parent 7a11617 commit 6af6f74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions TwitchDownloaderCLI/Models/TimeDuration.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
using System;
using System.Diagnostics;
using System.Globalization;
using System.Text.RegularExpressions;

namespace TwitchDownloaderCLI.Models
{
[DebuggerDisplay("{_timeSpan}")]
public readonly record struct TimeDuration
{
public static TimeDuration MinusOneSeconds { get; } = new(-1 * TimeSpan.TicksPerSecond);
Expand All @@ -30,6 +28,8 @@ public TimeDuration(long ticks)
_timeSpan = TimeSpan.FromTicks(ticks);
}

public override string ToString() => _timeSpan.ToString();

public static TimeDuration Parse(string str)
{
if (string.IsNullOrWhiteSpace(str))
Expand Down

0 comments on commit 6af6f74

Please sign in to comment.