---
title: RTIME
summary: null
url: https://www.fastly.com/documentation/reference/vcl/types/rtime
---

A relative time,
rendered in decimal format.
Units may be in milliseconds, seconds, minutes, hours, or days.
These are specified by a suffix of `ms`, `s`, `m`, `h`, `d`, `w`, and `y` respectively.
Whitespace is permitted between the value and its unit.
Negative durations are permitted.

![rtime-literal grammar](/reference/vcl/img/rtime-literal.svg)

For example:

```vcl
declare local var.r RTIME;
set var.r = 0ms;
set var.r = 5.3d;
set var.r = -2s;
set beresp.ttl = 5 m;
```

Conversions to STRING values are rendered with no units,
with values given in seconds to 3dp precision:

```vcl
declare local var.r RTIME;
set var.r = 3.5d;
set resp.http.X-r = var.r; /* "302400.000" */
```

RTIME values resolve into 64-bit signed integers measured in nanoseconds.
An RTIME value specified in VCL that - when converted into nanoseconds -
is less than -9223372036854775808(ns) or greater than 9223372036854775807(ns),
will be clamped to these respective minimum or maximum values:

| Suffix | Units       |  Minimum Value | Maximum Value |
| -----: | :---------- | -------------: | ------------: |
|   `ms` | millisecond | -9223372036854 | 9223372036854 |
|    `s` | second      |    -9223372036 |    9223372036 |
|    `m` | minute      |     -153722867 |     153722867 |
|    `h` | hour        |       -2562047 |       2562047 |
|    `d` | day         |        -106751 |        106751 |
|    `w` | week        |        -747257 |        747257 |
|    `y` | year        |           -292 |           292 |
