# RationalTime

> Data type that represents time as an integer count of a rational number.

## Definition

* **Type:** Struct
* **Namespace:** [Unity.IntegerTime](/engine/6000.6/script-reference/unity/integertime.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public struct RationalTime
```

## Properties

| Property                                                                         | Description                             |
| -------------------------------------------------------------------------------- | --------------------------------------- |
| [Count](/engine/6000.6/script-reference/unity/integertime/rationaltime/count.md) | Returns the number of ticks.            |
| [Ticks](/engine/6000.6/script-reference/unity/integertime/rationaltime/ticks.md) | Returns the number of ticks per second. |

## Static Methods

| Method                                                                                     | Description                                                                 |
| ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------- |
| [FromDouble](/engine/6000.6/script-reference/unity/integertime/rationaltime/fromdouble.md) | Converts a floating point number into a RationalTime with an explicit rate. |

## Operators

| Operator                                                                                      | Description                                                                                                                                                                           |
| --------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [DiscreteTime](/engine/6000.6/script-reference/unity/integertime/rationaltime/op-explicit.md) | Converts a RationalTime to DiscreteTime representation. If the rate denominator is 1 and the DiscreteTime.TicksPerSecond is a multiple of the numerator, this conversion is lossless. |

## Structs

| Struct                                                                                                          | Description                                                                                   |
| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| [RationalTime.TicksPerSecond](/engine/6000.6/script-reference/unity/integertime/rationaltime/tickspersecond.md) | The number of ticks per second ( rate ) of the discrete time, expressed as a rational number. |
