mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
newlib: fix _times_r
syscall implementation
tms_cstime should only take system time in child processes into account, so has to be zero. https://github.com/espressif/esp-idf/issues/81
This commit is contained in:
parent
6dd3681115
commit
d29935b9ce
@ -112,7 +112,7 @@ void esp_setup_time_syscalls()
|
|||||||
clock_t IRAM_ATTR _times_r(struct _reent *r, struct tms *ptms)
|
clock_t IRAM_ATTR _times_r(struct _reent *r, struct tms *ptms)
|
||||||
{
|
{
|
||||||
clock_t t = xTaskGetTickCount() * (portTICK_PERIOD_MS * CLK_TCK / 1000);
|
clock_t t = xTaskGetTickCount() * (portTICK_PERIOD_MS * CLK_TCK / 1000);
|
||||||
ptms->tms_cstime = t;
|
ptms->tms_cstime = 0;
|
||||||
ptms->tms_cutime = 0;
|
ptms->tms_cutime = 0;
|
||||||
ptms->tms_stime = t;
|
ptms->tms_stime = t;
|
||||||
ptms->tms_utime = 0;
|
ptms->tms_utime = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user