-
-
Save timglabisch/5255954 to your computer and use it in GitHub Desktop.
Varnish Inline C Random + Timestamp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C{ | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <sys/time.h> | |
}C | |
C{ | |
struct timeval tv; | |
char txt[200]; | |
gettimeofday(&tv, NULL); | |
sprintf(txt, "%d and time %d", rand()%4, (int)tv.tv_sec); | |
VRT_synth_page(sp, 0, txt, vrt_magic_string_end); | |
}C |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment