int IComparable.CompareTo(object obj)
{
if (obj == null)
{
return 1;
}
if (!(obj is ScriptTimeSpan))
{
throw new ArgumentException($"Object [{obj.GetType()}] cannot be compare to a date object");
}
var timeSpan = (ScriptTimeSpan)obj;
return value.CompareTo(timeSpan.value);
}