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

Go to the source code of this file.

Data Structures

struct  duration
 

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)
 
int64_t timeval_ms (void)
 
int timeval_subtract (struct timeval *result, struct timeval *x, struct timeval *y)
 

Function Documentation

◆ duration_elapsed()

float duration_elapsed ( const struct duration duration)
Returns
Elapsed time in seconds.

Definition at line 83 of file time_support.c.

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

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

◆ 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(), and stmqspi_blank_check().

◆ duration_measure()

int duration_measure ( struct duration duration)

Update the duration->elapsed field to finish the duration measurement.

Definition at line 74 of file time_support.c.

References duration::elapsed, gettimeofday(), NULL, duration::start, and timeval_subtract().

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

◆ duration_start()

int duration_start ( struct duration duration)

Update the duration->start field to start the duration measurement.

Definition at line 69 of file time_support.c.

References gettimeofday(), NULL, and duration::start.

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

◆ 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_ms()

int64_t timeval_ms ( void  )
Returns
gettimeofday() timeval as 64-bit in ms

Definition at line 23 of file time_support_common.c.

References gettimeofday(), NULL, timeval::tv_sec, and timeval::tv_usec.

Referenced by aarch64_do_restart_one(), aarch64_halt_smp(), aarch64_resume(), aarch64_step(), aarch64_step_restart_smp(), aarch64_wait_halt_one(), aduc702x_check_flash_completion(), aducm360_check_flash_completion(), aice_check_dbger(), aice_pipe_read(), aice_usb_step(), arm11_halt(), arm11_resume(), arm11_run_instr_data_from_core(), arm11_run_instr_data_to_core(), arm11_run_instr_no_data(), arm11_sc7_run(), arm11_step(), arm720t_soft_reset_halt(), arm7_9_execute_sys_speed(), arm7_9_soft_reset_halt(), arm920t_soft_reset_halt(), arm926ejs_cp15_read(), arm926ejs_cp15_write(), arm926ejs_soft_reset_halt(), arm_cti_ack_events(), armv7m_trace_itm_config(), busy_sleep(), cc26xx_wait_algo_done(), cc26xx_write(), cc3220sf_erase(), cc3220sf_mass_erase(), COMMAND_HANDLER(), cortex_a_handle_target_request(), cortex_a_step(), cortex_a_wait_dscr_bits(), cortex_m_load_core_reg_u32(), cortex_m_step(), cortex_m_store_core_reg_u32(), dpmv8_dpm_prepare(), dpmv8_exec_opcode(), dpmv8_read_dcc(), dpmv8_read_dcc_64(), efc_perform_command(), ejtag_dma_dstrt_poll(), esirisc_flash_wait(), esirisc_wait_debug_active(), esp32_soc_reset(), esp32s2_soc_reset(), esp32s3_soc_reset(), fespi_rx(), fespi_tx(), fespi_txwm_wait(), fespi_wip(), isc_wait_erase_program(), jim_util_ms(), jtagdp_overrun_check(), jtagspi_bulk_erase(), jtagspi_sector_erase(), jtagspi_wait(), keep_alive(), kept_alive(), kinetis_ftfx_command(), kinetis_mdm_poll_register(), linux_get_tasks(), linux_task_update(), log_init(), log_puts(), mpsse_flush(), msp432_wait_inactive(), msp432_wait_return_code(), msp432_write(), npcx_get_flash_id(), nrf5_wait_for_nvmc(), poll_busy(), poll_ssp_busy(), poll_tff(), psoc5lp_spc_busy_wait_data(), psoc5lp_spc_busy_wait_idle(), riscv_run_algorithm(), riscv_sample_buf_maybe_add_timestamp(), rpc_hf_wait_tend(), samd_check_error(), same5_wait_and_check_error(), sample_memory(), sample_memory_bus_v1(), samv_efc_perform_command(), sense_handler(), server_loop(), sh_qspi_wait_for_bit(), stlink_tcp_send_cmd(), swd_connect_multidrop(), swd_connect_single(), target_call_timer_callbacks_check_time(), target_halt(), target_poll(), target_register_timer_callback(), target_wait_state(), timeout_expired(), timeout_init(), vdebug_run_jtag_queue(), vdebug_run_reg_queue(), wait_for_pracc_rw(), wait_till_ready(), and xtensa_do_step().

◆ 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().