From 365f82c150181f8c460c1ae0560366971664492f Mon Sep 17 00:00:00 2001 From: des Date: Thu, 8 Nov 2007 16:52:40 +0000 Subject: [PATCH] Pressing 0-9 will change the delay to the corresponding power of two (e.g. press 3 for 2^3 = 8 seconds) git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2231 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishhist/varnishhist.c | 12 ++++++++++++ varnish-cache/bin/varnishstat/varnishstat.c | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/varnish-cache/bin/varnishhist/varnishhist.c b/varnish-cache/bin/varnishhist/varnishhist.c index 0d5b83ec..1457b7cd 100644 --- a/varnish-cache/bin/varnishhist/varnishhist.c +++ b/varnish-cache/bin/varnishhist/varnishhist.c @@ -279,6 +279,18 @@ do_curses(struct VSL_data *vd) case 'q': endwin(); return; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + delay = 1 << (ch - '0'); + break; default: beep(); break; diff --git a/varnish-cache/bin/varnishstat/varnishstat.c b/varnish-cache/bin/varnishstat/varnishstat.c index ec85884b..674f2ff4 100644 --- a/varnish-cache/bin/varnishstat/varnishstat.c +++ b/varnish-cache/bin/varnishstat/varnishstat.c @@ -148,6 +148,18 @@ do_curses(struct varnish_stats *VSL_stats, int delay) case 'q': endwin(); exit(0); + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + delay = 1 << (ch - '0'); + break; default: beep(); break; -- 2.39.5