diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2022-11-01 07:37:56 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-11-02 09:05:56 +0100 |
commit | be6dd69b70e6e8a1e1d6087ed3ca833fac82c813 (patch) | |
tree | b0d09778a8bc94b7c3337ac5cb6e032b9da8c5fe /commands/Kconfig | |
parent | 0673a1d5e43c1360149f11724f277c82adc06d3e (diff) | |
download | barebox-be6dd69b70e6e8a1e1d6087ed3ca833fac82c813.tar.gz |
commands: add new uptime command
We have a time command to record the delta of get_time_ns() to time
command execution, but have no command to just print get_time_ns().
Such a command can be useful to debug clocksources or to verify that a
system is still running and hasn't been reset by a yet unhandled
watchdog in-between.
Make development a bit easier by providing a new uptime command.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20221101063757.3225283-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/Kconfig')
-rw-r--r-- | commands/Kconfig | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/commands/Kconfig b/commands/Kconfig index 2ce990b561..a59616ad14 100644 --- a/commands/Kconfig +++ b/commands/Kconfig @@ -2289,6 +2289,19 @@ config CMD_TIME Note: This command depends on COMMAND being interruptible, otherwise the timer may overrun resulting in incorrect results +config CMD_UPTIME + bool "uptime" + help + uptime - Tell how long barebox has been running + + Usage: uptime [-n] + + This command formats the number of elapsed nanoseconds + as measured with the current clocksource. + + Options: + -n output elapsed time in nanoseconds + config CMD_STATE tristate depends on STATE |