FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
time.h File Reference
#include <stdint.h>

Go to the source code of this file.

Functions

int64_t av_gettime (void)
 Get the current time in microseconds.
 
int64_t av_gettime_relative (void)
 Get the current time in microseconds since some unspecified starting point.
 
int av_gettime_relative_is_monotonic (void)
 Indicates with a boolean result if the av_gettime_relative() time source is monotonic.
 
int av_usleep (unsigned usec)
 Sleep for a period of time.
 

Function Documentation

int64_t av_gettime ( void  )
int64_t av_gettime_relative ( void  )

Get the current time in microseconds since some unspecified starting point.

On platforms that support it, the time comes from a monotonic clock This property makes this time source ideal for measuring relative time. The returned values may not be monotonic on platforms where a monotonic clock is not available.

Definition at line 56 of file time.c.

Referenced by config_output(), dct_error(), enqueue_packet(), event_loop(), ff_network_wait_fd_timeout(), ff_rtp_check_and_send_back_rr(), ff_rtp_send_rtcp_feedback(), get_clock(), get_input_packet(), getutime(), hls_read(), idct248_error(), main(), parse_playlist(), read_data(), refresh_loop_wait_event(), retry_transfer_wrapper(), rtcp_parse_packet(), rtp_parse_one_packet(), rtsp_read_packet(), run_opencl_bench(), sap_write_packet(), sdl_audio_callback(), select_cur_seq_no(), set_clock(), stream_toggle_pause(), test_motion(), transcode(), transcode_init(), video_audio_display(), video_refresh(), and video_thread().

int av_gettime_relative_is_monotonic ( void  )

Indicates with a boolean result if the av_gettime_relative() time source is monotonic.

Definition at line 67 of file time.c.

int av_usleep ( unsigned  usec)

Sleep for a period of time.

Although the duration is expressed in microseconds, the actual delay may be rounded to the precision of the system timer.

Parameters
usecNumber of microseconds to sleep.
Returns
zero on success or (negative) error code.

Definition at line 76 of file time.c.

Referenced by ff_dxva2_common_end_frame(), gdigrab_read_packet(), hls_read(), main(), read_data(), refresh_loop_wait_event(), retry_transfer_wrapper(), rtmp_http_read(), transcode_step(), and wait_frame().