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:
chao an
2025-09-28 15:28:19 +08:00
committed by Xiang Xiao
parent 84b0492fbd
commit 4c7deedd27
10 changed files with 84 additions and 59 deletions
@@ -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;