mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 21:36:28 +08:00
sched/clock: remove return value of clock_systime_timespec()
clock_systime_timespec() always returns 0, so there is no need to check the return value in the caller code, let us remove the return value directly. Signed-off-by: chao an <anchao.archer@bytedance.com>
This commit is contained in:
@@ -64,12 +64,7 @@ static void clear_mic_boot_time(void)
|
||||
static void set_mic_boot_time(void)
|
||||
{
|
||||
struct timespec start;
|
||||
if (clock_systime_timespec(&start) < 0)
|
||||
{
|
||||
g_mic_boot_start_time = 0x0ull;
|
||||
return;
|
||||
}
|
||||
|
||||
clock_systime_timespec(&start);
|
||||
g_mic_boot_start_time = (uint64_t)start.tv_sec * 1000 +
|
||||
(uint64_t)start.tv_nsec / 1000000;
|
||||
}
|
||||
@@ -79,11 +74,7 @@ static void wait_mic_boot_finish(void)
|
||||
if (g_mic_boot_start_time != 0x0ull)
|
||||
{
|
||||
struct timespec end;
|
||||
if (clock_systime_timespec(&end) < 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
clock_systime_timespec(&end);
|
||||
uint64_t time = (uint64_t)end.tv_sec * 1000 +
|
||||
(uint64_t)end.tv_nsec / 1000000 -
|
||||
g_mic_boot_start_time;
|
||||
|
||||
Reference in New Issue
Block a user