From 3739568d8918ee183f432c55ff753867737f1f07 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Tue, 16 Jul 2013 17:13:32 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@5978 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/kernel/src/chvt.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'os/kernel/src') diff --git a/os/kernel/src/chvt.c b/os/kernel/src/chvt.c index d27f3170c..8864bce0c 100644 --- a/os/kernel/src/chvt.c +++ b/os/kernel/src/chvt.c @@ -75,17 +75,18 @@ void _vt_init(void) { * window. * @note When start==end then the function returns always true because the * whole time range is specified. + * @note This function can be called from any context. * + * @param[in] time the time to be verified * @param[in] start the start of the time window (inclusive) * @param[in] end the end of the time window (non inclusive) - * @retval TRUE current time within the specified time window. - * @retval FALSE current time not within the specified time window. + * @retval true current time within the specified time window. + * @retval false current time not within the specified time window. * - * @api + * @special */ -bool_t chVTIsSystemTimeWithin(systime_t start, systime_t end) { +bool chVTIsTimeWithin(systime_t time, systime_t start, systime_t end) { - systime_t time = chVTGetSystemTime(); return end > start ? (time >= start) && (time < end) : (time >= start) || (time < end); } -- cgit v1.2.3