mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-28 13:00:45 +00:00
convert *speedgraphval to double
This commit is contained in:
parent
a68a523d40
commit
3361ea907b
@ -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);
|
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;
|
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;
|
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 */
|
#endif /* X11 */
|
||||||
|
|
||||||
|
@ -71,8 +71,8 @@ void print_addrs(struct text_object *, char *, int);
|
|||||||
#endif /* __linux__ */
|
#endif /* __linux__ */
|
||||||
#ifdef X11
|
#ifdef X11
|
||||||
void parse_net_stat_graph_arg(struct text_object *, const char *, void *);
|
void parse_net_stat_graph_arg(struct text_object *, const char *, void *);
|
||||||
uint8_t downspeedgraphval(struct text_object *);
|
double downspeedgraphval(struct text_object *);
|
||||||
uint8_t upspeedgraphval(struct text_object *);
|
double upspeedgraphval(struct text_object *);
|
||||||
#endif /* X11 */
|
#endif /* X11 */
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
#ifdef HAVE_IWLIB
|
#ifdef HAVE_IWLIB
|
||||||
|
Loading…
Reference in New Issue
Block a user