PulseAudio
3.0
|
00001 #ifndef footimevalhfoo 00002 #define footimevalhfoo 00003 00004 /*** 00005 This file is part of PulseAudio. 00006 00007 Copyright 2004-2006 Lennart Poettering 00008 Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB 00009 00010 PulseAudio is free software; you can redistribute it and/or modify 00011 it under the terms of the GNU Lesser General Public License as 00012 published by the Free Software Foundation; either version 2.1 of the 00013 License, or (at your option) any later version. 00014 00015 PulseAudio is distributed in the hope that it will be useful, but 00016 WITHOUT ANY WARRANTY; without even the implied warranty of 00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 Lesser General Public License for more details. 00019 00020 You should have received a copy of the GNU Lesser General Public 00021 License along with PulseAudio; if not, write to the Free Software 00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00023 USA. 00024 ***/ 00025 00026 #include <pulse/cdecl.h> 00027 #include <pulse/gccmacro.h> 00028 #include <pulse/sample.h> 00029 #include <pulse/version.h> 00030 00034 PA_C_DECL_BEGIN 00035 00037 #define PA_MSEC_PER_SEC ((pa_usec_t) 1000ULL) 00038 00040 #define PA_USEC_PER_SEC ((pa_usec_t) 1000000ULL) 00041 00043 #define PA_NSEC_PER_SEC ((unsigned long long) 1000000000ULL) 00044 00046 #define PA_USEC_PER_MSEC ((pa_usec_t) 1000ULL) 00047 00049 #define PA_NSEC_PER_MSEC ((unsigned long long) 1000000ULL) 00050 00052 #define PA_NSEC_PER_USEC ((unsigned long long) 1000ULL) 00053 00055 #define PA_USEC_INVALID ((pa_usec_t) -1) 00056 00058 #define PA_USEC_MAX ((pa_usec_t) -2) 00059 00060 struct timeval; 00061 00063 struct timeval *pa_gettimeofday(struct timeval *tv); 00064 00067 pa_usec_t pa_timeval_diff(const struct timeval *a, const struct timeval *b) PA_GCC_PURE; 00068 00070 int pa_timeval_cmp(const struct timeval *a, const struct timeval *b) PA_GCC_PURE; 00071 00073 pa_usec_t pa_timeval_age(const struct timeval *tv); 00074 00076 struct timeval* pa_timeval_add(struct timeval *tv, pa_usec_t v); 00077 00079 struct timeval* pa_timeval_sub(struct timeval *tv, pa_usec_t v); 00080 00082 struct timeval* pa_timeval_store(struct timeval *tv, pa_usec_t v); 00083 00085 pa_usec_t pa_timeval_load(const struct timeval *tv); 00086 00087 PA_C_DECL_END 00088 00089 #endif