<p>JACK time is in units of 'frames', according to the current sample rate. The absolute value of frame times is meaningless, frame times have meaning only relative to each other. </p>
<dlclass="section return"><dt>Returns</dt><dd>the estimated current time in frames. This function is intended for use in other threads (not the process callback). The return value can be compared with the value of jack_last_frame_time to relate time in other threads to JACK time. </dd></dl>
<dlclass="section return"><dt>Returns</dt><dd>the estimated time in frames that has passed since the JACK server began the current process cycle. </dd></dl>
<p>The free function to be used on memory returned by jack_port_get_connections, jack_port_get_all_connections and jack_get_ports functions. This is MANDATORY on Windows when otherwise all nasty runtime version related crashes can occur. Developers are strongly encouraged to use this function instead of the standard "free" function in new code. </p>
<p>This function may only be used from the process callback. It provides the internal cycle timing information as used by most of the other time related functions. This allows the caller to map between frame counts and microseconds with full precision (i.e. without rounding frame times to integers), and also provides e.g. the microseconds time of the start of the current cycle directly (it has to be computed otherwise).</p>
<p>If the return value is zero, the following information is provided in the variables pointed to by the arguments:</p>
<p>current_frames: the frame time counter at the start of the current cycle, same as <aclass="el" href="group__TimeFunctions.html#gae09e1c61ff0c43d4daea6cf480b7b915">jack_last_frame_time()</a>. current_usecs: the microseconds time at the start of the current cycle. next_usecs: the microseconds time of the start of the next next cycle as computed by the DLL. period_usecs: the current best estimate of the period time in microseconds.</p>
<p>NOTES:</p>
<p>Because of the types used, all the returned values except period_usecs are unsigned. In computations mapping between frames and microseconds <em>signed</em> differences are required. The easiest way is to compute those separately and assign them to the appropriate signed variables, int32_t for frames and int64_t for usecs. See the implementation of <aclass="el" href="group__TimeFunctions.html#ga9338f5b4866b3e749647d9c4b41c23b6">jack_frames_to_time()</a> and Jack_time_to_frames() for an example.</p>
<p>Unless there was an xrun, skipped cycles, or the current cycle is the first after freewheeling or starting Jack, the value of current_usecs will always be the value of next_usecs of the previous cycle.</p>
<p>The value of period_usecs will in general NOT be exactly equal to the difference of next_usecs and current_usecs. This is because to ensure stability of the DLL and continuity of the mapping, a fraction of the loop error must be included in next_usecs. For an accurate mapping between frames and microseconds, the difference of next_usecs and current_usecs should be used, and not period_usecs.</p>
<dlclass="section return"><dt>Returns</dt><dd>zero if OK, non-zero otherwise. </dd></dl>
<dlclass="section return"><dt>Returns</dt><dd>the precise time at the start of the current process cycle. This function may only be used from the process callback, and can be used to interpret timestamps generated by <aclass="el" href="group__TimeFunctions.html#ga45cec2e76db58e72b46339229de64697">jack_frame_time()</a> in other threads with respect to the current process cycle.</dd></dl>
<p>This is the only jack time function that returns exact time: when used during the process callback it always returns the same value (until the next process callback, where it will return that value + nframes, etc). The return value is guaranteed to be monotonic and linear in this fashion unless an xrun occurs. If an xrun occurs, clients must check this value again, as time may have advanced in a non-linear way (e.g. cycles may have been skipped). </p>
<p>Set via <aclass="el" href="group__TimeFunctions.html#ga550faaef2bb17b03b0068fe094e7b92f">jack_set_error_function()</a>, otherwise a JACK-provided default will print <em>msg</em> (plus a newline) to stderr.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">msg</td><td>error message text (no newline at end). </td></tr>
<p>Set via <aclass="el" href="group__TimeFunctions.html#ga1555b7b4ae4056a42c70a3fa278ae17f">jack_set_info_function()</a>, otherwise a JACK-provided default will print <em>msg</em> (plus a newline) to stdout.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">msg</td><td>info message text (no newline at end). </td></tr>