mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-01-15 03:43:50 +00:00
convert diskiographval_* to double
This commit is contained in:
parent
1382915d1e
commit
a68a523d40
14
src/diskio.c
14
src/diskio.c
@ -165,27 +165,25 @@ void parse_diskiograph_arg(struct text_object *obj, const char *arg)
|
|||||||
free(buf);
|
free(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX: what about max values? */
|
double diskiographval(struct text_object *obj)
|
||||||
|
|
||||||
uint8_t diskiographval(struct text_object *obj)
|
|
||||||
{
|
{
|
||||||
struct diskio_stat *diskio = obj->data.opaque;
|
struct diskio_stat *diskio = obj->data.opaque;
|
||||||
|
|
||||||
return (diskio ? round_to_int(diskio->current) : 0);
|
return (diskio ? diskio->current : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t diskiographval_read(struct text_object *obj)
|
double diskiographval_read(struct text_object *obj)
|
||||||
{
|
{
|
||||||
struct diskio_stat *diskio = obj->data.opaque;
|
struct diskio_stat *diskio = obj->data.opaque;
|
||||||
|
|
||||||
return (diskio ? round_to_int(diskio->current_read) : 0);
|
return (diskio ? diskio->current_read : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t diskiographval_write(struct text_object *obj)
|
double diskiographval_write(struct text_object *obj)
|
||||||
{
|
{
|
||||||
struct diskio_stat *diskio = obj->data.opaque;
|
struct diskio_stat *diskio = obj->data.opaque;
|
||||||
|
|
||||||
return (diskio ? round_to_int(diskio->current_write) : 0);
|
return (diskio ? diskio->current_write : 0);
|
||||||
}
|
}
|
||||||
#endif /* X11 */
|
#endif /* X11 */
|
||||||
|
|
||||||
|
@ -57,9 +57,9 @@ void print_diskio_read(struct text_object *, char *, int);
|
|||||||
void print_diskio_write(struct text_object *, char *, int);
|
void print_diskio_write(struct text_object *, char *, int);
|
||||||
#ifdef X11
|
#ifdef X11
|
||||||
void parse_diskiograph_arg(struct text_object *, const char *);
|
void parse_diskiograph_arg(struct text_object *, const char *);
|
||||||
uint8_t diskiographval(struct text_object *);
|
double diskiographval(struct text_object *);
|
||||||
uint8_t diskiographval_read(struct text_object *);
|
double diskiographval_read(struct text_object *);
|
||||||
uint8_t diskiographval_write(struct text_object *);
|
double diskiographval_write(struct text_object *);
|
||||||
#endif /* X11 */
|
#endif /* X11 */
|
||||||
|
|
||||||
#endif /* DISKIO_H_ */
|
#endif /* DISKIO_H_ */
|
||||||
|
Loading…
Reference in New Issue
Block a user