1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-27 04:32:55 +00:00

convert *speedgraphval to double

This commit is contained in:
Phil Sutter 2009-12-04 01:53:53 +01:00
parent a68a523d40
commit 3361ea907b
2 changed files with 6 additions and 6 deletions

View File

@ -206,18 +206,18 @@ void parse_net_stat_graph_arg(struct text_object *obj, const char *arg, void *fr
obj->data.opaque = get_net_stat(DEFAULTNETDEV, obj, free_at_crash);
}
uint8_t downspeedgraphval(struct text_object *obj)
double downspeedgraphval(struct text_object *obj)
{
struct net_stat *ns = obj->data.opaque;
return (ns ? round_to_int(ns->recv_speed / 1024.0) : 0);
return (ns ? (ns->recv_speed / 1024.0) : 0);
}
uint8_t upspeedgraphval(struct text_object *obj)
double upspeedgraphval(struct text_object *obj)
{
struct net_stat *ns = obj->data.opaque;
return (ns ? round_to_int(ns->trans_speed / 1024.0) : 0);
return (ns ? (ns->trans_speed / 1024.0) : 0);
}
#endif /* X11 */

View File

@ -71,8 +71,8 @@ void print_addrs(struct text_object *, char *, int);
#endif /* __linux__ */
#ifdef X11
void parse_net_stat_graph_arg(struct text_object *, const char *, void *);
uint8_t downspeedgraphval(struct text_object *);
uint8_t upspeedgraphval(struct text_object *);
double downspeedgraphval(struct text_object *);
double upspeedgraphval(struct text_object *);
#endif /* X11 */
#ifdef __linux__
#ifdef HAVE_IWLIB