[pulseaudio-commits] r1934 - in /branches/lennart/src/pulse: timeval.c timeval.h
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Sun Oct 7 06:54:50 PDT 2007
Author: lennart
Date: Sun Oct 7 15:54:49 2007
New Revision: 1934
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1934&root=pulseaudio&view=rev
Log:
add new API function pa_timeval_store()
Modified:
branches/lennart/src/pulse/timeval.c
branches/lennart/src/pulse/timeval.h
Modified: branches/lennart/src/pulse/timeval.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulse/timeval.c?rev=1934&root=pulseaudio&r1=1933&r2=1934&view=diff
==============================================================================
--- branches/lennart/src/pulse/timeval.c (original)
+++ branches/lennart/src/pulse/timeval.c Sun Oct 7 15:54:49 2007
@@ -55,7 +55,7 @@
#else
#define EPOCHFILETIME (116444736000000000LL)
#endif
-
+
FILETIME ft;
LARGE_INTEGER li;
__int64 t;
@@ -79,7 +79,7 @@
pa_usec_t pa_timeval_diff(const struct timeval *a, const struct timeval *b) {
pa_usec_t r;
-
+
pa_assert(a);
pa_assert(b);
@@ -147,3 +147,12 @@
return tv;
}
+
+struct timeval* pa_timeval_store(struct timeval *tv, pa_usec_t v) {
+ pa_assert(tv);
+
+ tv->tv_sec = v / PA_USEC_PER_SEC;
+ tv->tv_usec = v % PA_USEC_PER_SEC;
+
+ return tv;
+}
Modified: branches/lennart/src/pulse/timeval.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulse/timeval.h?rev=1934&root=pulseaudio&r1=1933&r2=1934&view=diff
==============================================================================
--- branches/lennart/src/pulse/timeval.h (original)
+++ branches/lennart/src/pulse/timeval.h Sun Oct 7 15:54:49 2007
@@ -55,6 +55,9 @@
/** Add the specified time inmicroseconds to the specified timeval structure */
struct timeval* pa_timeval_add(struct timeval *tv, pa_usec_t v) PA_GCC_PURE;
+/** Store the specified uec value in the timeval struct */
+struct timeval* pa_timeval_store(struct timeval *tv, pa_usec_t v);
+
PA_C_DECL_END
#endif
More information about the pulseaudio-commits
mailing list