summaryrefslogtreecommitdiffstats
path: root/Process.h
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2021-01-27 15:11:48 +0100
committerBenBE <BenBE@geshi.org>2021-01-30 14:21:26 +0100
commitfdaa15bd8d6df7dd4721ed70a913865b343a80c7 (patch)
tree2015c85afa9a2167e1c92a151dea924e05c72570 /Process.h
parentfee744abd2d7c1a3a9b8fa4ece7ddfc872078850 (diff)
Linux: overhaul io process fields
- avoid UBSAN conversions - print N/A on no data (i.e. as unprivileged user) - fix rate calculation to show bytes (instead of a thousandth) - print bytes as human number (i.e. 8MB) instead of 8388608 - stabilize sorting by adjusting NAN values to very tiny negative number
Diffstat (limited to 'Process.h')
-rw-r--r--Process.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Process.h b/Process.h
index 77f29d03..fce5017d 100644
--- a/Process.h
+++ b/Process.h
@@ -253,14 +253,18 @@ static inline bool Process_isChildOf(const Process* this, pid_t pid) {
void Process_setupColumnWidths(void);
+/* Takes number in kilo units (base 1024) */
void Process_humanNumber(RichString* str, unsigned long long number, bool coloring);
+/* Takes number in bare units (base 1000) */
void Process_colorNumber(RichString* str, unsigned long long number, bool coloring);
+/* Takes number in hundredths of a seconds */
void Process_printTime(RichString* str, unsigned long long totalHundredths);
void Process_fillStarttimeBuffer(Process* this);
+/* Takes number in bare units (base 1024) */
void Process_outputRate(RichString* str, char* buffer, size_t n, double rate, int coloring);
void Process_printLeftAlignedField(RichString* str, int attr, const char* content, unsigned int width);

© 2014-2024 Faster IT GmbH | imprint | privacy policy