Commit b047716a authored by Kristian Lyngstøl's avatar Kristian Lyngstøl

Remove old start_time code, replaced by VSL_stats->uptime


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4553 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 69feede2
......@@ -136,8 +136,6 @@ child_main(void)
if (params->diag_bitmap & 0x00020000)
SMP_Ready();
VSL_stats->start_time = (time_t)TIM_real();
CLI_Run();
STV_close();
......
......@@ -126,7 +126,7 @@ do_curses(struct varnish_stats *VSL_stats, int delay, const char *fields)
tt = tv.tv_usec * 1e-6 + tv.tv_sec;
lt = tt - lt;
rt = tv.tv_sec - VSL_stats->start_time;
rt = VSL_stats->uptime;
up = rt;
mvprintw(0, 0, "%*s", COLS - 1, VSL_Name());
......@@ -244,15 +244,7 @@ do_once(struct varnish_stats *VSL_stats, const char* fields)
double up;
gettimeofday(&tv, NULL);
up = tv.tv_sec - VSL_stats->start_time;
do {
if (fields != NULL && ! show_field("uptime", fields ))
break;
printf("%-16s %12ju %12s %s\n", "uptime",
(uintmax_t)(tv.tv_sec - VSL_stats->start_time),
". ", "Child uptime");
} while (0);
up = VSL_stats->uptime;
#define MAC_STAT(n, t, l, f, d) \
do { \
......@@ -297,7 +289,6 @@ list_fields(void)
fprintf(stderr, "Varnishstat -f option fields:\n");
fprintf(stderr, "Field name Description\n");
fprintf(stderr, "---------- -----------\n");
fprintf(stderr, "uptime Child uptime\n");
#define MAC_STAT(n, t, l, f, d) \
do { \
......@@ -312,7 +303,6 @@ valid_fields(const char* fields)
{
int i, valid_field, field_length;
const char *all_fields[] = {
"uptime",
#define MAC_STAT(n, t, l, f, d) \
#n,
#include "stat_field.h"
......
......@@ -32,7 +32,6 @@
#include <stdint.h>
struct varnish_stats {
time_t start_time;
#define MAC_STAT(n, t, l, f, e) t n;
#include "stat_field.h"
#undef MAC_STAT
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment