## TimeSpan::Compare method


比较两个 [TimeSpan](../) 对象。

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


| Parameter | Type | 描述 |
| --- | --- | --- |
| t1 | TimeSpan | 第一个比较数 |
| t2 | TimeSpan | 第二个比较数 |

### ReturnValue

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

## 另见

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