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, and y respectively. Whitespace is permitted between the value and its unit. Negative durations are permitted.

For example:

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:

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:

SuffixUnitsMinimum ValueMaximum Value
msmillisecond-92233720368549223372036854
ssecond-92233720369223372036
mminute-153722867153722867
hhour-25620472562047
dday-106751106751
yyear-292292