## TimeSpan::Compare method


Compares two [TimeSpan](../) objects.

```cpp
static constexpr int System::TimeSpan::Compare(TimeSpan t1, TimeSpan t2)
```


| Parameter | Type | Description |
| --- | --- | --- |
| t1 | TimeSpan | The first comparand |
| t2 | TimeSpan | The second comparand |

### ReturnValue

-1 if **t1** is shorter than **t2**; 0 if **t1** is equal to **t2**; 1 if **t1** is longer than **t2**

## See Also

* Class [TimeSpan](../)
* Class [TimeSpan](../)
* Namespace [System](../../)
* Library [Aspose.PUB for C++](../../../)
