Original commit message from CVS:
* gst/elements/gstfdsrc.c: (gst_fdsrc_get): Use GST_TIME_TO_TIMEVAL()
* gst/gstclock.h: Avoid using 64-bit % operator (slow!)
+2004-02-13 David Schleef <ds@schleef.org>
+
+ * gst/elements/gstfdsrc.c: (gst_fdsrc_get): Use GST_TIME_TO_TIMEVAL()
+ * gst/gstclock.h: Avoid using 64-bit % operator (slow!)
+
2004-02-13 Mattias Wadman <mattias@sudac.org>
reviewed by: David Schleef <ds@schleef.org>
if (src->timeout != 0)
{
- tp->tv_sec = src->timeout / 1000000000;
- tp->tv_usec = src->timeout - t.tv_sec * 1000000000;
+ GST_TIME_TO_TIMEVAL (src->timeout, t);
}
else
tp = NULL;
#define GST_TIME_TO_TIMEVAL(t,tv) \
G_STMT_START { \
(tv).tv_sec = (t) / GST_SECOND; \
- (tv).tv_usec = ((t) / GST_USECOND) % GST_MSECOND; \
+ (tv).tv_usec = ((t) - (tv).tv_sec * GST_SECOND) / GST_USECOND; \
} G_STMT_END
#define GST_CLOCK_ENTRY_TRACE_NAME "GstClockEntry"
if (src->timeout != 0)
{
- tp->tv_sec = src->timeout / 1000000000;
- tp->tv_usec = src->timeout - t.tv_sec * 1000000000;
+ GST_TIME_TO_TIMEVAL (src->timeout, t);
}
else
tp = NULL;