mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-02-18 19:59:13 +08:00
[libc][ctime] stime clear tv.tv_usec as zero
when using stime set rtc time, tv.tv_usec not 0,but always is 0xdeadbeef, make set time error
This commit is contained in:
parent
ba6a27c850
commit
517b5eb016
@ -383,6 +383,7 @@ int stime(const time_t *t)
|
||||
}
|
||||
|
||||
tv.tv_sec = *t;
|
||||
tv.tv_usec = 0;
|
||||
if (set_timeval(&tv) == RT_EOK)
|
||||
{
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user