mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-19 02:17:37 +08:00
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:
@@ -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,
|
||||
|
Reference in New Issue
Block a user