OpenOCD
time_support.c File Reference
Include dependency graph for time_support.c:

Go to the source code of this file.

Functions

float duration_elapsed (const struct duration *duration)
 
float duration_kbps (const struct duration *duration, size_t count)
 
int duration_measure (struct duration *duration)
 Update the duration->elapsed field to finish the duration measurement. More...
 
int duration_start (struct duration *duration)
 Update the duration->start field to start the duration measurement. More...
 
int timeval_add_time (struct timeval *result, long sec, long usec)
 
int timeval_compare (const struct timeval *x, const struct timeval *y)
 
int timeval_subtract (struct timeval *result, struct timeval *x, struct timeval *y)
 

Function Documentation

◆ duration_elapsed()

float duration_elapsed ( const struct duration duration)

◆ duration_kbps()

float duration_kbps ( const struct duration duration,
size_t  count 
)
Returns
KB/sec for the elapsed duration and count bytes.

Definition at line 90 of file time_support.c.

References count, and duration_elapsed().

Referenced by COMMAND_HANDLER(), COMMAND_HELPER(), esp32_apptrace_print_stats(), and stmqspi_blank_check().

◆ duration_measure()

◆ duration_start()

int duration_start ( struct duration duration)

◆ timeval_add_time()

int timeval_add_time ( struct timeval result,
long  sec,
long  usec 
)

◆ timeval_compare()

int timeval_compare ( const struct timeval x,
const struct timeval y 
)

◆ timeval_subtract()

int timeval_subtract ( struct timeval result,
struct timeval x,
struct timeval y 
)

Definition at line 21 of file time_support.c.

References timeval::tv_sec, and timeval::tv_usec.

Referenced by COMMAND_HANDLER(), and duration_measure().