X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Futils_latency.c;h=4e1fba627a8b6777a08e433c76ee397fc10144bc;hp=01c8b5c22ea6c9a5f5952a9a5248e055562cc800;hb=633c3966f770e4d46651a2fe219a18d8a9907a9f;hpb=7fc4c1f412c4002b787b5ce24b08e3091ced08a5 diff --git a/src/utils_latency.c b/src/utils_latency.c index 01c8b5c2..4e1fba62 100644 --- a/src/utils_latency.c +++ b/src/utils_latency.c @@ -1,6 +1,6 @@ /** * collectd - src/utils_latency.c - * Copyright (C) 2013 Florian Forster + * Copyright (C) 2013 Florian Forster * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -110,6 +110,20 @@ cdtime_t latency_counter_get_max (latency_counter_t *lc) /* {{{ */ return (lc->max); } /* }}} cdtime_t latency_counter_get_max */ +cdtime_t latency_counter_get_sum (latency_counter_t *lc) /* {{{ */ +{ + if (lc == NULL) + return (0); + return (lc->sum); +} /* }}} cdtime_t latency_counter_get_sum */ + +size_t latency_counter_get_num (latency_counter_t *lc) /* {{{ */ +{ + if (lc == NULL) + return (0); + return (lc->num); +} /* }}} size_t latency_counter_get_num */ + cdtime_t latency_counter_get_average (latency_counter_t *lc) /* {{{ */ { double average;