mbgtools-lx  4.2.8
Extrapolation of high resolution time stamps

Functions

int mbg_get_xhrt_time_as_pcps_hr_time (MBG_XHRT_INFO *p, PCPS_HR_TIME *p_hrt)
 Retrieve an extrapolated time stamp in PCPS_HR_TIME format. More...
 
int mbg_get_xhrt_time_as_filetime (MBG_XHRT_INFO *p, int *p_ft)
 Retrieve an extrapolated time stamp in FILETIME format. More...
 
int mbg_get_xhrt_cycles_frequency (MBG_XHRT_INFO *p, MBG_PC_CYCLES_FREQUENCY *p_freq_hz)
 Retrieve the frequency of the system's cycles counter. More...
 

Detailed Description

::TODO

Function Documentation

◆ mbg_get_xhrt_cycles_frequency()

int mbg_get_xhrt_cycles_frequency ( MBG_XHRT_INFO p,
MBG_PC_CYCLES_FREQUENCY p_freq_hz 
)

Retrieve the frequency of the system's cycles counter.

The frequency is determined by the device polling thread. See Extrapolation of high resolution time stamps for details and limitations.

This function is only implemented for targets that support threads.

Parameters
[in,out]pPointer to a MBG_XHRT_INFO structure used to retrieve data from the polling thread.
[out]p_freq_hzPointer to a MBG_PC_CYCLES_FREQUENCY variable in which the frequency is returned.
Returns
The return code from the API call used by the polling thread to read the time from the device, usually mbg_get_hr_time_cycles, so MBG_SUCCESS on success, else one of the MBG_ERROR_CODES.
See also
mbg_xhrt_poll_thread_create
mbg_xhrt_poll_thread_stop
mbg_get_xhrt_time_as_pcps_hr_time
mbg_get_xhrt_time_as_filetime
Extrapolation of high resolution time stamps

Referenced by do_mbgxhrtime(), and mbg_set_current_process_affinity_to_cpu().

◆ mbg_get_xhrt_time_as_filetime()

int mbg_get_xhrt_time_as_filetime ( MBG_XHRT_INFO p,
int *  p_ft 
)

Retrieve an extrapolated time stamp in FILETIME format.

The time stamp is extrapolated using the system's current cycles counter value and a time stamp plus associated cycles counter value saved by the polling thread. See Extrapolation of high resolution time stamps for details and limitations.

Since FILETIME is a Windows-specific type this function is only implemented under Windows.

Parameters
[in,out]pPointer to a MBG_XHRT_INFO structure used to retrieve data from the polling thread.
[out]p_ftPointer to a FILETIME structure to be filled up.
Returns
The return code from the API call used by the polling thread to read the time from the device, usually mbg_get_hr_time_cycles, so MBG_SUCCESS on success, else one of the MBG_ERROR_CODES.
See also
mbg_xhrt_poll_thread_create
mbg_xhrt_poll_thread_stop
mbg_get_xhrt_time_as_pcps_hr_time
mbg_get_xhrt_cycles_frequency
Extrapolation of high resolution time stamps

Referenced by mbg_set_current_process_affinity_to_cpu().

◆ mbg_get_xhrt_time_as_pcps_hr_time()

int mbg_get_xhrt_time_as_pcps_hr_time ( MBG_XHRT_INFO p,
PCPS_HR_TIME p_hrt 
)

Retrieve an extrapolated time stamp in PCPS_HR_TIME format.

The time stamp is extrapolated using the system's current cycles counter value and a time stamp plus associated cycles counter value saved by the polling thread. See Extrapolation of high resolution time stamps for details and limitations.

This function is only implemented for targets that support threads.

Parameters
[in,out]pPointer to a MBG_XHRT_INFO structure used to retrieve data from the polling thread.
[out]p_hrtPointer to a PCPS_HR_TIME structure to be filled up.
Returns
The return code from the API call used by the polling thread to read the time from the device, usually mbg_get_hr_time_cycles, so MBG_SUCCESS on success, else one of the MBG_ERROR_CODES.
See also
mbg_xhrt_poll_thread_create
mbg_xhrt_poll_thread_stop
mbg_get_xhrt_time_as_filetime
mbg_get_xhrt_cycles_frequency
Extrapolation of high resolution time stamps

Referenced by do_mbgxhrtime(), and mbg_set_current_process_affinity_to_cpu().