Select one of the symbols to view example projects that use it.
 
Outline
#include "sdkconfig.h"
#include <stdint.h>
#include <sys/time.h>
#include <time.h>
#include "esp_timer.h"
esp_tls_get_platform_time()
Files
loading...
SourceVuESP-IDF Framework and ExamplesESP-IDFcomponents/esp-tls/esp_tls_platform_port.c
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/* * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 *//* ... */ #include "sdkconfig.h" #include <stdint.h> #if CONFIG_IDF_TARGET_LINUX #include <sys/time.h> #include <time.h>/* ... */ #else #include "esp_timer.h" #endif uint64_t esp_tls_get_platform_time(void) { #if CONFIG_IDF_TARGET_LINUX // Use gettimeofday for Linux/MacOS, Ideally esp_timer should be used but it is not implemented for Linux/MacOS. struct timeval time = {}; gettimeofday(&time, NULL); uint64_t curr_time = ((uint64_t)time.tv_sec * 1000000) + (time.tv_usec); return curr_time;/* ... */ #else // For all other esp targets use esp_timer return esp_timer_get_time();/* ... */ #endif }{ ... }
Details
Show:
from
Types: Columns:
This file uses the notable symbols shown below. Click anywhere in the file to view more details.