summaryrefslogtreecommitdiffstats
path: root/libavutil/time.h
Commit message (Collapse)AuthorAgeFilesLines
* lavu: Add av_gettime_relativeMartin Storsjö2014-10-241-0/+9
| | | | | | | | | | | | | | | | | | | Since av_gettime() is used in a number of places where actual real time clock is required, the monotonic clock introduced in ebef9f5a5 would have consequences that are hard to handle. Instead split it into a separate function that can be used in the cases where only relative time is desired. On platform where no monotonic clock is available, the difference between the two av_gettime functions is not clear, and one could mistakenly use the relative clock where an absolute one is required. Therefore add an offset, to make it evident that the time returned from av_gettime_relative never is actual current real time, even though it is based on av_gettime. Based on a patch by Olivier Langlois. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavu: add av_usleep() functionMans Rullgard2012-06-221-0/+10
| | | | | | | | | | | | | | | This function implements a delay using the first available of the following functions: - nanosleep() - usleep() - Sleep() (Windows) The conditional #includes in time.c are simplified by including unistd.h and windows.h whenever they are available rather than having these lines triggered by specific functions. Signed-off-by: Mans Rullgard <mans@mansr.com>
* Move av_gettime() to libavutilMans Rullgard2012-06-201-0/+29
Signed-off-by: Mans Rullgard <mans@mansr.com>
OpenPOWER on IntegriCloud