[][src]Function libipt_sys::pt_qry_time

pub unsafe extern "C" fn pt_qry_time(
    decoder: *mut pt_query_decoder,
    time: *mut u64,
    lost_mtc: *mut u32,
    lost_cyc: *mut u32
) -> c_int

Query the current time.

On success, provides the time at the last query in @time.

The time is similar to what a rdtsc instruction would return. Depending on the configuration, the time may not be fully accurate. If TSC is not enabled, the time is relative to the last synchronization and can't be used to correlate with other TSC-based time sources. In this case, -pte_no_time is returned and the relative time is provided in @time.

Some timing-related packets may need to be dropped (mostly due to missing calibration or incomplete configuration). To get an idea about the quality of the estimated time, we record the number of dropped MTC and CYC packets.

If @lost_mtc is not NULL, set it to the number of lost MTC packets. If @lost_cyc is not NULL, set it to the number of lost CYC packets.

Returns zero on success, a negative error code otherwise.

Returns -pte_invalid if @decoder or @time is NULL. Returns -pte_no_time if there has not been a TSC packet.