/* In this example, user task fetches the sensor values every seconds.  */
void user_task_periodic(void *pvParameters)
/* In this example, user task fetches the sensor values every seconds.  */
void user_task_periodic(void *pvParameters)
{
    uint16_t tvoc;
    uint16_t eco2;
    TickType_t last_wakeup = xTaskGetTickCount();
    while (1)
    {
        if (ccs811_get_results (sensor, &tvoc, &eco2, 0, 0))
            printf("%.3f CCS811 Sensor periodic: TVOC %d ppb, eCO2 %d ppm\n",
                   (double)sdk_system_get_time()*1e-3, tvoc, eco2);
        vTaskDelayUntil(&last_wakeup, 1000 / portTICK_PERIOD_MS);
    }
}