[pulseaudio-commits] r1954 - in /branches/lennart/src/pulse: timeval.c timeval.h

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Sat Oct 27 05:57:58 PDT 2007


Author: lennart
Date: Sat Oct 27 14:57:57 2007
New Revision: 1954

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1954&root=pulseaudio&view=rev
Log:
add pa_timeval_load() API

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=1954&root=pulseaudio&r1=1953&r2=1954&view=diff
==============================================================================
--- branches/lennart/src/pulse/timeval.c (original)
+++ branches/lennart/src/pulse/timeval.c Sat Oct 27 14:57:57 2007
@@ -156,3 +156,11 @@
 
     return tv;
 }
+
+pa_usec_t pa_timeval_load(const struct timeval *tv) {
+    pa_assert(tv);
+
+    return
+        (pa_usec_t) tv->tv_sec * PA_USEC_PER_SEC +
+        (pa_usec_t) tv->tv_usec;
+}

Modified: branches/lennart/src/pulse/timeval.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulse/timeval.h?rev=1954&root=pulseaudio&r1=1953&r2=1954&view=diff
==============================================================================
--- branches/lennart/src/pulse/timeval.h (original)
+++ branches/lennart/src/pulse/timeval.h Sat Oct 27 14:57:57 2007
@@ -56,8 +56,11 @@
 /** 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 */
+/** Store the specified uec value in the timeval struct. \since 0.9.7 */
 struct timeval* pa_timeval_store(struct timeval *tv, pa_usec_t v);
+
+/** Load the specified tv value and return it in usec. \since 0.9.7 */
+pa_usec_t pa_timeval_load(const struct timeval *tv);
 
 PA_C_DECL_END
 




More information about the pulseaudio-commits mailing list