Remove CONFIG_CLOCK_MONOTONIC special code

since this opion doesn't exist anymore

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2022-02-15 16:16:54 +08:00
committed by Xiang Xiao
parent bc5d1165aa
commit 4cc0c755bf
9 changed files with 5 additions and 41 deletions

View File

@@ -38,12 +38,6 @@
#define MAX_TIME_STRING 80
#ifdef CONFIG_CLOCK_MONOTONIC
# define TIME_CLOCK CLOCK_MONOTONIC
#else
# define TIME_CLOCK CLOCK_REALTIME
#endif
/****************************************************************************
* Private Function Prototypes
****************************************************************************/
@@ -303,7 +297,7 @@ int cmd_time(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
/* Get the current time */
ret = clock_gettime(TIME_CLOCK, &start);
ret = clock_gettime(CLOCK_MONOTONIC, &start);
if (ret < 0)
{
nsh_error(vtbl, g_fmtcmdfailed, argv[0], "clock_gettime", NSH_ERRNO);
@@ -329,7 +323,7 @@ int cmd_time(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
/* Get and print the elapsed time */
ret = clock_gettime(TIME_CLOCK, &end);
ret = clock_gettime(CLOCK_MONOTONIC, &end);
if (ret < 0)
{
nsh_error(vtbl, g_fmtcmdfailed,