Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
1f26a9b5
Commit
1f26a9b5
authored
Mar 13, 2018
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doc: be concise about about std.real2integer / std.real2time
parent
5a239cbc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
vmod.vcc
lib/libvmod_std/vmod.vcc
+8
-3
No files found.
lib/libvmod_std/vmod.vcc
View file @
1f26a9b5
...
...
@@ -195,16 +195,21 @@ Example
$Function INT real2integer(REAL r, INT fallback)
Description
Converts the real *r* to an integer. If conversion fails,
Rounds the real *r* to the nearest integer, but round halfway
cases away from zero (see round(3)). If conversion fails,
*fallback* will be returned.
Example
set req.http.integer = std.real2integer(1140618699.00, 0);
set req.http.posone = real2integer( 0.5, 0); # = 1.0
set req.http.negone = real2integer(-0.5, 0); # = -1.0
$Function TIME real2time(REAL r, TIME fallback)
Description
Converts the real *r* to a time. If conversion fails,
*fallback* will be returned.
Rounds the real *r* to the nearest integer (see
`func_real2integer`_) and returns the corresponding time when
interpreted as a unix epoch. If conversion fails, *fallback*
will be returned.
Example
set req.http.time = std.real2time(1140618699.00, now);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment