aboutsummaryrefslogtreecommitdiff
path: root/task.h
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2017-05-03 16:38:09 -0400
committerPaul Selkirk <paul@psgd.org>2017-05-03 16:38:09 -0400
commit7ef51e89d5a1d7d75cb0b8d3832327beb46319dd (patch)
tree1024e1add5490394bf5747ab30ab528d51ca472c /task.h
parent1175ff63f2a8c4762692551403862f9f0789aef8 (diff)
Add some task metrics.
Diffstat (limited to 'task.h')
-rw-r--r--task.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/task.h b/task.h
index 6b45db8..24f87ce 100644
--- a/task.h
+++ b/task.h
@@ -73,4 +73,15 @@ extern void task_delay(uint32_t delay);
extern void task_mutex_lock(task_mutex_t *mutex);
extern void task_mutex_unlock(task_mutex_t *mutex);
+#ifdef TASK_METRICS
+#include <sys/time.h>
+
+struct task_metrics {
+ struct timeval avg, max;
+};
+
+void task_get_metrics(struct task_metrics *tm);
+void task_reset_metrics(void);
+#endif
+
#endif /* _TASK_H_ */