[][src]Function newrelic_sys::newrelic_set_segment_timing

pub unsafe extern "C" fn newrelic_set_segment_timing(
    segment: *mut newrelic_segment_t,
    start_time: newrelic_time_us_t,
    duration: newrelic_time_us_t
) -> bool

@brief Override the timing for the given segment.

Segments are normally timed automatically based on when they were started and ended. Calling this function disables the automatic timing, and uses the times given instead.

Note that this may cause unusual looking transaction traces, as this function does not change the parent segment. It is likely that users of this function will also want to use newrelic_set_segment_parent() to manually parent their segments.

@param [in] segment The segment to manually time. @param [in] start_time The start time for the segment, in microseconds since the start of the transaction. @param [in] duration The duration of the segment in microseconds. @return True if the segment timing was changed; false otherwise.