summaryrefslogtreecommitdiff
path: root/common/timer.c
diff options
context:
space:
mode:
authorShawn Nematbakhsh <shawnn@chromium.org>2017-07-31 15:37:29 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-09-01 14:41:52 -0700
commit9663bdca5cae0d2d67d6e9cf422a6b6119a24926 (patch)
treeab5894b7747ab42bb11dac372b6ca2b0c1fd6aae /common/timer.c
parentfe0a3b99ff8303113c52e4573361325b44574b5c (diff)
downloadchrome-ec-9663bdca5cae0d2d67d6e9cf422a6b6119a24926.tar.gz
timer: Add note about `forcetime` command being unsafe
BUG=b:63909040 TEST=None BRANCH=None Change-Id: If1022655bc283377fa804e524d36ca0cca716250 Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/595042 Commit-Ready: Shawn N <shawnn@chromium.org> Tested-by: Shawn N <shawnn@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'common/timer.c')
-rw-r--r--common/timer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/timer.c b/common/timer.c
index 1e4b1911e2..da3feff404 100644
--- a/common/timer.c
+++ b/common/timer.c
@@ -275,6 +275,11 @@ DECLARE_CONSOLE_COMMAND(waitms, command_wait,
#endif
#ifdef CONFIG_CMD_FORCETIME
+/*
+ * Force the hwtimer to a given time. This may have undesired consequences,
+ * especially when going "backward" in time, because task deadlines are
+ * left un-adjusted.
+ */
static int command_force_time(int argc, char **argv)
{
char *e;