MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / stime

Function stime

components/libc/compilers/common/ctime.c:368–379  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

366RTM_EXPORT(clock);
367
368int stime(const time_t *t)
369{
370#ifdef RT_USING_RTC
371 if ((t != RT_NULL) && (_control_rtc(RT_DEVICE_CTRL_RTC_SET_TIME, (void *)t) == RT_EOK))
372 {
373 return 0;
374 }
375#endif /* RT_USING_RTC */
376
377 rt_set_errno(EFAULT);
378 return -1;
379}
380RTM_EXPORT(stime);
381
382time_t timegm(struct tm * const t)

Callers

nothing calls this directly

Calls 2

_control_rtcFunction · 0.85
rt_set_errnoFunction · 0.85

Tested by

no test coverage detected