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:
parent
bc5d1165aa
commit
4cc0c755bf
@ -6,7 +6,6 @@
|
|||||||
config EXAMPLES_CALIB_UDELAY
|
config EXAMPLES_CALIB_UDELAY
|
||||||
tristate "Calibration tool for udelay"
|
tristate "Calibration tool for udelay"
|
||||||
default n
|
default n
|
||||||
select CLOCK_MONOTONIC
|
|
||||||
select LIBC_FLOATINGPOINT
|
select LIBC_FLOATINGPOINT
|
||||||
---help---
|
---help---
|
||||||
Note that libm support is also required by this tool. You
|
Note that libm support is also required by this tool. You
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
config EXAMPLES_LIBCANARD
|
config EXAMPLES_LIBCANARD
|
||||||
tristate "libcandard example"
|
tristate "libcandard example"
|
||||||
default n
|
default n
|
||||||
depends on CANUTILS_LIBCANARD && CLOCK_MONOTONIC && SYSTEM_TIME64
|
depends on CANUTILS_LIBCANARD && SYSTEM_TIME64
|
||||||
---help---
|
---help---
|
||||||
Enable the LIBCANARD example
|
Enable the LIBCANARD example
|
||||||
|
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
config INTERPRETERS_WAMR
|
config INTERPRETERS_WAMR
|
||||||
tristate "Webassembly Micro Runtime"
|
tristate "Webassembly Micro Runtime"
|
||||||
default n
|
default n
|
||||||
select CLOCK_MONOTONIC
|
|
||||||
|
|
||||||
if INTERPRETERS_WAMR
|
if INTERPRETERS_WAMR
|
||||||
|
|
||||||
|
@ -233,14 +233,9 @@ static void iperf_report_task(void *arg)
|
|||||||
struct timespec start;
|
struct timespec start;
|
||||||
uintmax_t now_len;
|
uintmax_t now_len;
|
||||||
int ret;
|
int ret;
|
||||||
#ifdef CONFIG_CLOCK_MONOTONIC
|
|
||||||
const clockid_t clockid = CLOCK_MONOTONIC;
|
|
||||||
#else
|
|
||||||
const clockid_t clockid = CLOCK_REALTIME;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
now_len = s_iperf_ctrl.total_len;
|
now_len = s_iperf_ctrl.total_len;
|
||||||
ret = clock_gettime(clockid, &now);
|
ret = clock_gettime(CLOCK_MONOTONIC, &now);
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "clock_gettime failed\n");
|
fprintf(stderr, "clock_gettime failed\n");
|
||||||
@ -258,7 +253,7 @@ static void iperf_report_task(void *arg)
|
|||||||
last_len = now_len;
|
last_len = now_len;
|
||||||
last = now;
|
last = now;
|
||||||
now_len = s_iperf_ctrl.total_len;
|
now_len = s_iperf_ctrl.total_len;
|
||||||
ret = clock_gettime(clockid, &now);
|
ret = clock_gettime(CLOCK_MONOTONIC, &now);
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "clock_gettime failed\n");
|
fprintf(stderr, "clock_gettime failed\n");
|
||||||
|
@ -542,18 +542,14 @@ static void ntpc_settime(int64_t offset, FAR struct timespec *start_realtime,
|
|||||||
{
|
{
|
||||||
struct timespec tp;
|
struct timespec tp;
|
||||||
struct timespec curr_realtime;
|
struct timespec curr_realtime;
|
||||||
#ifdef CONFIG_CLOCK_MONOTONIC
|
|
||||||
struct timespec curr_monotonic;
|
struct timespec curr_monotonic;
|
||||||
int64_t diffms_real;
|
int64_t diffms_real;
|
||||||
int64_t diffms_mono;
|
int64_t diffms_mono;
|
||||||
int64_t diff_diff_ms;
|
int64_t diff_diff_ms;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Get the system times */
|
/* Get the system times */
|
||||||
|
|
||||||
clock_gettime(CLOCK_REALTIME, &curr_realtime);
|
clock_gettime(CLOCK_REALTIME, &curr_realtime);
|
||||||
|
|
||||||
#ifdef CONFIG_CLOCK_MONOTONIC
|
|
||||||
clock_gettime(CLOCK_MONOTONIC, &curr_monotonic);
|
clock_gettime(CLOCK_MONOTONIC, &curr_monotonic);
|
||||||
|
|
||||||
/* Check differences between monotonic and realtime. */
|
/* Check differences between monotonic and realtime. */
|
||||||
@ -583,9 +579,6 @@ static void ntpc_settime(int64_t offset, FAR struct timespec *start_realtime,
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
UNUSED(start_monotonic);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Apply offset */
|
/* Apply offset */
|
||||||
|
|
||||||
@ -1293,9 +1286,7 @@ static int ntpc_daemon(int argc, FAR char **argv)
|
|||||||
CONFIG_NETUTILS_NTPCLIENT_NUM_SAMPLES);
|
CONFIG_NETUTILS_NTPCLIENT_NUM_SAMPLES);
|
||||||
|
|
||||||
clock_gettime(CLOCK_REALTIME, &start_realtime);
|
clock_gettime(CLOCK_REALTIME, &start_realtime);
|
||||||
#ifdef CONFIG_CLOCK_MONOTONIC
|
|
||||||
clock_gettime(CLOCK_MONOTONIC, &start_monotonic);
|
clock_gettime(CLOCK_MONOTONIC, &start_monotonic);
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Collect samples. */
|
/* Collect samples. */
|
||||||
|
|
||||||
|
@ -300,11 +300,7 @@ int cmd_dd(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
|||||||
/* Then perform the data transfer */
|
/* Then perform the data transfer */
|
||||||
|
|
||||||
#ifdef CONFIG_NSH_CMDOPT_DD_STATS
|
#ifdef CONFIG_NSH_CMDOPT_DD_STATS
|
||||||
#ifdef CONFIG_CLOCK_MONOTONIC
|
|
||||||
clock_gettime(CLOCK_MONOTONIC, &ts0);
|
clock_gettime(CLOCK_MONOTONIC, &ts0);
|
||||||
#else
|
|
||||||
clock_gettime(CLOCK_REALTIME, &ts0);
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
dd.sector = 0;
|
dd.sector = 0;
|
||||||
@ -353,11 +349,7 @@ int cmd_dd(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
|||||||
ret = OK;
|
ret = OK;
|
||||||
|
|
||||||
#ifdef CONFIG_NSH_CMDOPT_DD_STATS
|
#ifdef CONFIG_NSH_CMDOPT_DD_STATS
|
||||||
#ifdef CONFIG_CLOCK_MONOTONIC
|
|
||||||
clock_gettime(CLOCK_MONOTONIC, &ts1);
|
clock_gettime(CLOCK_MONOTONIC, &ts1);
|
||||||
#else
|
|
||||||
clock_gettime(CLOCK_REALTIME, &ts1);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
elapsed = (((uint64_t)ts1.tv_sec * NSEC_PER_SEC) + ts1.tv_nsec);
|
elapsed = (((uint64_t)ts1.tv_sec * NSEC_PER_SEC) + ts1.tv_nsec);
|
||||||
elapsed -= (((uint64_t)ts0.tv_sec * NSEC_PER_SEC) + ts0.tv_nsec);
|
elapsed -= (((uint64_t)ts0.tv_sec * NSEC_PER_SEC) + ts0.tv_nsec);
|
||||||
|
@ -38,12 +38,6 @@
|
|||||||
|
|
||||||
#define MAX_TIME_STRING 80
|
#define MAX_TIME_STRING 80
|
||||||
|
|
||||||
#ifdef CONFIG_CLOCK_MONOTONIC
|
|
||||||
# define TIME_CLOCK CLOCK_MONOTONIC
|
|
||||||
#else
|
|
||||||
# define TIME_CLOCK CLOCK_REALTIME
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Function Prototypes
|
* Private Function Prototypes
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -303,7 +297,7 @@ int cmd_time(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
|||||||
|
|
||||||
/* Get the current time */
|
/* Get the current time */
|
||||||
|
|
||||||
ret = clock_gettime(TIME_CLOCK, &start);
|
ret = clock_gettime(CLOCK_MONOTONIC, &start);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
nsh_error(vtbl, g_fmtcmdfailed, argv[0], "clock_gettime", NSH_ERRNO);
|
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 */
|
/* Get and print the elapsed time */
|
||||||
|
|
||||||
ret = clock_gettime(TIME_CLOCK, &end);
|
ret = clock_gettime(CLOCK_MONOTONIC, &end);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
nsh_error(vtbl, g_fmtcmdfailed,
|
nsh_error(vtbl, g_fmtcmdfailed,
|
||||||
|
@ -48,12 +48,7 @@ CSRCS = $(EMBEDLOG_SOURCES)/src/el-options.c \
|
|||||||
ifeq ($(CONFIG_EMBEDLOG_ENABLE_TIMESTAMP),y)
|
ifeq ($(CONFIG_EMBEDLOG_ENABLE_TIMESTAMP),y)
|
||||||
CFLAGS += -DENABLE_TIMESTAMP
|
CFLAGS += -DENABLE_TIMESTAMP
|
||||||
CFLAGS += -DENABLE_REALTIME
|
CFLAGS += -DENABLE_REALTIME
|
||||||
|
|
||||||
ifeq ($(CONFIG_CLOCK_MONOTONIC),y)
|
|
||||||
CFLAGS += -DENABLE_MONOTONIC
|
CFLAGS += -DENABLE_MONOTONIC
|
||||||
else
|
|
||||||
CFLAGS += -DENABLE_MONOTONIC=0
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_EMBEDLOG_ENABLE_FRACTIONS),y)
|
ifeq ($(CONFIG_EMBEDLOG_ENABLE_FRACTIONS),y)
|
||||||
|
@ -29,7 +29,6 @@ config LIBUV_ASYNC
|
|||||||
config LIBUV_TIMER
|
config LIBUV_TIMER
|
||||||
bool "libuv software timers support"
|
bool "libuv software timers support"
|
||||||
default n
|
default n
|
||||||
select CLOCK_MONOTONIC
|
|
||||||
---help---
|
---help---
|
||||||
Enable software timers support in libuv.
|
Enable software timers support in libuv.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user