X-Git-Url: https://unix4lyfe.org/gitweb/darkstat-debian/blobdiff_plain/3c6b3682c70be84db86e70c191016913a9836c31..HEAD:/graph_db.c diff --git a/graph_db.c b/graph_db.c index 4485d45..8884e9d 100644 --- a/graph_db.c +++ b/graph_db.c @@ -55,9 +55,6 @@ void graph_init(void) { graph_db[i]->in = xmalloc(sizeof(uint64_t) * graph_db[i]->num_bars); graph_db[i]->out = xmalloc(sizeof(uint64_t) * graph_db[i]->num_bars); } - start_mono = now_mono(); - start_real = now_real(); - last_real = 0; graph_reset(); } @@ -71,7 +68,15 @@ void graph_reset(void) { for (i=0; i\n"); - str_append(buf, "Running for "); + str_append(buf, "Measuring for "); rf = length_of_time(d_mono); str_appendstr(buf, rf); str_free(rf); str_append(buf, ""); - if (abs(d_real - d_mono) > 1) + if (labs((long)(d_real - d_mono)) > 1) str_appendf(buf, " (real time is off by %qd sec)", - (qd)d_real - (qd)d_mono); + (qd)(d_real - d_mono)); if (strftime(start_when, sizeof(start_when), "%Y-%m-%d %H:%M:%S %Z%z", localtime(&start_real)) != 0) str_appendf(buf, ", since %s", start_when); str_appendf(buf,".
\n" - "Total %'qu bytes, " + "Seen %'qu bytes, " "in %'qu packets. " "(%'u captured, " "%'u dropped)
\n"