summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/charts.c10
-rw-r--r--src/charts.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/src/charts.c b/src/charts.c
index 8001526..9d31603 100644
--- a/src/charts.c
+++ b/src/charts.c
@@ -65,6 +65,7 @@ typedef struct _vwm_charts_t {
vmon_t vmon;
float prev_sampling_interval_secs, sampling_interval_secs;
int sampling_paused, contiguous_drops, primed;
+ unsigned marker_distance;
float inv_ticks_per_sec, inv_total_delta;
unsigned defer_maintenance:1;
} vwm_charts_t;
@@ -1300,6 +1301,15 @@ void vwm_charts_rate_set(vwm_charts_t *charts, unsigned hertz)
}
+/* set an arbitrary marker spacing in pixels, 0 disables markers (default) */
+void vwm_charts_marker_distance_set(vwm_charts_t *charts, unsigned distance)
+{
+ assert(charts);
+
+ charts->marker_distance = distance;
+}
+
+
/* convenience function for returning the time delta as a seconds.fraction float */
static float delta(struct timespec *cur, struct timespec *prev)
{
diff --git a/src/charts.h b/src/charts.h
index e175d18..888fc9d 100644
--- a/src/charts.h
+++ b/src/charts.h
@@ -18,6 +18,7 @@ void vwm_charts_destroy(vwm_charts_t *charts);
void vwm_charts_rate_increase(vwm_charts_t *charts);
void vwm_charts_rate_decrease(vwm_charts_t *charts);
void vwm_charts_rate_set(vwm_charts_t *charts, unsigned hertz);
+void vwm_charts_marker_distance_set(vwm_charts_t *charts, unsigned distance);
int vwm_charts_update(vwm_charts_t *charts, int *desired_delay_us);
vwm_chart_t * vwm_chart_create(vwm_charts_t *charts, int pid, int width, int height, const char *name);
© All Rights Reserved