Use TimeSpan.Zero

Proprietary

Replace new TimeSpan(0) and TimeSpan.FromX(0) with TimeSpan.Zero. The static TimeSpan.Zero field is more readable and avoids unnecessary object creation.

OpenRewrite.Recipes.CSharp.CodeQuality.Simplification.UseTimeSpanZero
mod run . --recipe=OpenRewrite.Recipes.CSharp.CodeQuality.Simplification.UseTimeSpanZero

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.