added to git
This commit is contained in:
+45
@@ -0,0 +1,45 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#define X_SIZE 40
|
||||
#define LINE_BUF 128
|
||||
#define PANE_BUF 8194
|
||||
|
||||
void draw_graph(char buf[PANE_BUF], int *datapoints, int i);
|
||||
///_|> descry: Given datapoints and the number of datapoints, graph them. Push
|
||||
/// datapoints left offscreen if they cannot all be displayed.
|
||||
///_|> buf: buffer to write output to.
|
||||
///_|> datapoints: array of datapoints
|
||||
///_|> i: last datapoint index
|
||||
///_|> returning: void
|
||||
|
||||
void draw_cores(int cpu_cores, int cpu_max_freq, int pipe);
|
||||
///_|> descry: draws the cores pane for main
|
||||
///_|> cpu_cores: number of cpu cores
|
||||
///_|> cpu_max_freq: max frequency of the cpu
|
||||
///_|> pipe: pipe to write data to
|
||||
///_|> returning: void
|
||||
|
||||
void draw_cpu_title(char buf[PANE_BUF], float cpu_util_percent);
|
||||
///_|> descry: draws title for cpu graph
|
||||
///_|> buf: buffer to write output to.
|
||||
///_|> cpu_util_percent: the percent of cpu being utilized
|
||||
///_|> returning: void
|
||||
|
||||
void draw_mem_title(char buf[PANE_BUF], float mem_used, float mem_total);
|
||||
///_|> descry: draws title for cpu graph
|
||||
///_|> buf: buffer to write output to.
|
||||
///_|> cpu_util_percent: the percent of cpu being utilized
|
||||
///_|> returning: void
|
||||
|
||||
void draw_reset(int samples, int tdelay);
|
||||
///_|> descry: draws title for function and resets screen
|
||||
///_|> samples: number of samples to show
|
||||
///_|> tdelay: period to show
|
||||
///_|> returning: void
|
||||
|
||||
double min(double a, double b);
|
||||
///_|> descry: takes min of a and b
|
||||
///_|> a: some number
|
||||
///_|> b: some number
|
||||
///_|> returning: min of a and b
|
||||
Reference in New Issue
Block a user