private void AddTimeSpan(Dictionary<string, string> parameters, string key, TimeSpan? value)
{
if (!value.HasValue || value.Value.Ticks < 0) { return; }
double roundedSeconds = Math.Round(value.Value.TotalSeconds, 0, MidpointRounding.AwayFromZero);
AddInt(parameters, key, (int)roundedSeconds);
}