# DiscreteTime

> Constructs a discrete time from either seconds (float/double) or ticks (int/long).

## Definition

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

## DiscreteTime(DiscreteTime)

Constructs a discrete time from either seconds (float/double) or ticks (int/long).

```csharp
public DiscreteTime(DiscreteTime x)
```

### Parameters

**** (\[DiscreteTime]\(/engine/6000.7/script-reference/unity/integertime/discretetime)): Copy constructor.

## DiscreteTime(float)

Constructs a discrete time from either seconds (float/double) or ticks (int/long).

```csharp
public DiscreteTime(float v)
```

### Parameters

**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): Float/Double represent seconds, long/int represent ticks.

## DiscreteTime(double)

Constructs a discrete time from either seconds (float/double) or ticks (int/long).

```csharp
public DiscreteTime(double v)
```

### Parameters

**** (\[double]\(https\://learn.microsoft.com/dotnet/api/system.double)): Float/Double represent seconds, long/int represent ticks.

## DiscreteTime(long)

Constructs a discrete time from either seconds (float/double) or ticks (int/long).

```csharp
public DiscreteTime(long v)
```

### Parameters

**** (\[long]\(https\://learn.microsoft.com/dotnet/api/system.int64)): Float/Double represent seconds, long/int represent ticks.

## DiscreteTime(int)

Constructs a discrete time from either seconds (float/double) or ticks (int/long).

```csharp
public DiscreteTime(int v)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Float/Double represent seconds, long/int represent ticks.
