aboutsummaryrefslogtreecommitdiff
path: root/src/helper/time_support.h
diff options
context:
space:
mode:
authorAlexander Kurz <akurz@blala.de>2016-02-13 10:54:52 +0100
committerAndreas Fritiofson <andreas.fritiofson@gmail.com>2016-02-13 10:49:39 +0000
commit3e07e1cdfac63d5fb93260803d16e79f292dae73 (patch)
treedf4bf7816bbe7f04fa9ec6f28fe5d64d992c77c4 /src/helper/time_support.h
parentfdb8c598ecd912147a08db53f2fd7bfa34b67d8a (diff)
Helper time_support: const function arguments
duration_elapsed and duration_kbps will not modify the struct duration passed as function argument, hence it should be declared const. Change-Id: I459c396952c78e907257e2c2f2c630abde92aaa8 Signed-off-by: Alexander Kurz <akurz@blala.de> Reviewed-on: http://openocd.zylin.com/3232 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Diffstat (limited to 'src/helper/time_support.h')
-rw-r--r--src/helper/time_support.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/helper/time_support.h b/src/helper/time_support.h
index ab839826..5a95e7ee 100644
--- a/src/helper/time_support.h
+++ b/src/helper/time_support.h
@@ -55,8 +55,8 @@ int duration_start(struct duration *duration);
int duration_measure(struct duration *duration);
/** @returns Elapsed time in seconds. */
-float duration_elapsed(struct duration *duration);
+float duration_elapsed(const struct duration *duration);
/** @returns KB/sec for the elapsed @a duration and @a count bytes. */
-float duration_kbps(struct duration *duration, size_t count);
+float duration_kbps(const struct duration *duration, size_t count);
#endif /* TIME_SUPPORT_H */