# 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.7/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.

This is the double precision version of [Time.time](/engine/6000.7/script-reference/unityengine/time/time.md). It offers more precision than a float or single value, particularly over extended periods of real-world time. In most cases, prefer [Time.timeAsDouble](/engine/6000.7/script-reference/unityengine/time/timeasdouble.md) over [Time.time](/engine/6000.7/script-reference/unityengine/time/time.md) for greater precision.

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

You can use `Time.timeAsDouble` for timestamping and measuring elapsed durations relative to the start of the application. For duration of the current frame and related per-frame accumulation or simulation steps, use [Time.deltaTime](/engine/6000.7/script-reference/unityengine/time/deltatime.md) instead.

The value of `Time.timeAsDouble` is undefined during `Awake` messages and starts after all messages are finished. `Time.timeAsDouble` does not update if the Editor is paused. For a time value unaffected by pausing, refer to [Time.realtimeSinceStartupAsDouble](/engine/6000.7/script-reference/unityengine/time/realtimesincestartupasdouble.md).

### 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);
        }
    }
}
```
