# timeAsDouble

> The double precision time at the beginning of this frame (Read Only). This is the time in seconds since the start of the game.

## Definition

* **Type:** Property
* **Namespace:** [UnityEngine](/engine/6000.0/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public static double timeAsDouble { get; }
```

### Remarks

Time.timeAsDouble is the amount of time in seconds that the application has been running for. It is read-only.

Double precision version of [Time.time](/engine/6000.0/script-reference/unityengine/time/time.md). This offers more precision than a float or single value, particularly over extended periods of real-world time. In almost all cases, you should use the [Time.timeAsDouble](/engine/6000.0/script-reference/unityengine/time/timeasdouble.md) equivalent over [Time.time](/engine/6000.0/script-reference/unityengine/time/time.md).

The application receives the current [Time.timeAsDouble](/engine/6000.0/script-reference/unityengine/time/timeasdouble.md) at the beginning of each frame, with the value increasing per frame. A [Time.timeAsDouble](/engine/6000.0/script-reference/unityengine/time/timeasdouble.md) call per frame receives the same value. When called from FixedUpdate it returns the [Time.fixedTimeAsDouble](/engine/6000.0/script-reference/unityengine/time/fixedtimeasdouble.md) property.

Regular (per frame) calls should be avoided: [Time.timeAsDouble](/engine/6000.0/script-reference/unityengine/time/timeasdouble.md) is intended to supply the length of time the application has been running for, and not the time per frame.

The value of [Time.timeAsDouble](/engine/6000.0/script-reference/unityengine/time/timeasdouble.md)  is undefined during Awake messages and starts after all messages are finished. [Time.timeAsDouble](/engine/6000.0/script-reference/unityengine/time/timeasdouble.md) does not update if the Editor is paused. See [Time.realtimeSinceStartupAsDouble](/engine/6000.0/script-reference/unityengine/time/realtimesincestartupasdouble.md) for a time value that is unaffected by pausing.

### Examples

```csharp
//If the Fire1 button is pressed, a projectile
//will be Instantiated every 0.5 seconds.

using UnityEngine;
using System.Collections;

public class Example : MonoBehaviour
{
    public GameObject projectile;
    public float fireRate = 0.5f;
    private double nextFire = 0.0f;

    void Update()
    {
        if (Input.GetButton("Fire1") && Time.timeAsDouble > nextFire)
        {
            nextFire = Time.timeAsDouble + fireRate;
            Instantiate(projectile, transform.position, transform.rotation);
        }
    }
}
```
