perl -p -i -e 's/pa_rtclock_usec/pa_rtclock_now/g' `find . -name '*.[ch]'`
authorMarc-André Lureau <marc-andre.lureau@nokia.com>
Sat, 4 Apr 2009 19:56:38 +0000 (22:56 +0300)
committerMarc-André Lureau <marcandre.lureau@gmail.com>
Fri, 19 Jun 2009 16:04:04 +0000 (19:04 +0300)
18 files changed:
src/daemon/cpulimit.c
src/modules/alsa/alsa-sink.c
src/modules/alsa/alsa-source.c
src/modules/bluetooth/module-bluetooth-device.c
src/modules/module-combine.c
src/modules/module-esound-sink.c
src/modules/module-null-sink.c
src/modules/module-sine-source.c
src/modules/module-solaris.c
src/modules/module-tunnel.c
src/modules/raop/module-raop-sink.c
src/modules/rtp/module-rtp-recv.c
src/pulse/stream.c
src/pulsecore/log.c
src/pulsecore/ratelimit.c
src/pulsecore/rtclock.c
src/pulsecore/rtclock.h
src/pulsecore/rtpoll.c

index 45d6a0f..e9cefdc 100644 (file)
@@ -125,7 +125,7 @@ static void signal_handler(int sig) {
         char t[256];
 #endif
 
-        now = pa_rtclock_usec();
+        now = pa_rtclock_now();
         elapsed = now - last_time;
 
 #ifdef PRINT_CPU_LOAD
@@ -184,7 +184,7 @@ int pa_cpu_limit_init(pa_mainloop_api *m) {
     pa_assert(the_pipe[1] == -1);
     pa_assert(!installed);
 
-    last_time = pa_rtclock_usec();
+    last_time = pa_rtclock_now();
 
     /* Prepare the main loop pipe */
     if (pipe(the_pipe) < 0) {
index 281371f..37ebe54 100644 (file)
@@ -707,7 +707,7 @@ static void update_smoother(struct userdata *u) {
 
     /* Hmm, if the timestamp is 0, then it wasn't set and we take the current time */
     if (now1 <= 0)
-        now1 = pa_rtclock_usec();
+        now1 = pa_rtclock_now();
 
     now2 = pa_bytes_to_usec((uint64_t) position, &u->sink->sample_spec);
 
@@ -721,7 +721,7 @@ static pa_usec_t sink_get_latency(struct userdata *u) {
 
     pa_assert(u);
 
-    now1 = pa_rtclock_usec();
+    now1 = pa_rtclock_now();
     now2 = pa_smoother_get(u->smoother, now1);
 
     delay = (int64_t) pa_bytes_to_usec(u->write_count, &u->sink->sample_spec) - (int64_t) now2;
@@ -752,7 +752,7 @@ static int suspend(struct userdata *u) {
     pa_assert(u);
     pa_assert(u->pcm_handle);
 
-    pa_smoother_pause(u->smoother, pa_rtclock_usec());
+    pa_smoother_pause(u->smoother, pa_rtclock_now());
 
     /* Let's suspend -- we don't call snd_pcm_drain() here since that might
      * take awfully long with our long buffer sizes today. */
@@ -1246,7 +1246,7 @@ static void thread_func(void *userdata) {
                     pa_log_info("Starting playback.");
                     snd_pcm_start(u->pcm_handle);
 
-                    pa_smoother_resume(u->smoother, pa_rtclock_usec(), TRUE);
+                    pa_smoother_resume(u->smoother, pa_rtclock_now(), TRUE);
                 }
 
                 update_smoother(u);
@@ -1275,7 +1275,7 @@ static void thread_func(void *userdata) {
 
                 /* Convert from the sound card time domain to the
                  * system time domain */
-                cusec = pa_smoother_translate(u->smoother, pa_rtclock_usec(), sleep_usec);
+                cusec = pa_smoother_translate(u->smoother, pa_rtclock_now(), sleep_usec);
 
 /*                 pa_log_debug("Waking up in %0.2fms (system clock).", (double) cusec / PA_USEC_PER_MSEC); */
 
@@ -1581,7 +1581,7 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca
             TRUE,
             TRUE,
             5,
-            pa_rtclock_usec(),
+            pa_rtclock_now(),
             TRUE);
 
     dev_id = pa_modargs_get_value(
index 4be27eb..3251065 100644 (file)
@@ -669,7 +669,7 @@ static void update_smoother(struct userdata *u) {
 
     /* Hmm, if the timestamp is 0, then it wasn't set and we take the current time */
     if (now1 <= 0)
-        now1 = pa_rtclock_usec();
+        now1 = pa_rtclock_now();
 
     now2 = pa_bytes_to_usec(position, &u->source->sample_spec);
 
@@ -682,7 +682,7 @@ static pa_usec_t source_get_latency(struct userdata *u) {
 
     pa_assert(u);
 
-    now1 = pa_rtclock_usec();
+    now1 = pa_rtclock_now();
     now2 = pa_smoother_get(u->smoother, now1);
 
     delay = (int64_t) now2 - (int64_t) pa_bytes_to_usec(u->read_count, &u->source->sample_spec);
@@ -707,7 +707,7 @@ static int suspend(struct userdata *u) {
     pa_assert(u);
     pa_assert(u->pcm_handle);
 
-    pa_smoother_pause(u->smoother, pa_rtclock_usec());
+    pa_smoother_pause(u->smoother, pa_rtclock_now());
 
     /* Let's suspend */
     snd_pcm_close(u->pcm_handle);
@@ -833,7 +833,7 @@ static int unsuspend(struct userdata *u) {
     /* FIXME: We need to reload the volume somehow */
 
     snd_pcm_start(u->pcm_handle);
-    pa_smoother_resume(u->smoother, pa_rtclock_usec(), TRUE);
+    pa_smoother_resume(u->smoother, pa_rtclock_now(), TRUE);
 
     pa_log_info("Resumed successfully...");
 
@@ -1131,7 +1131,7 @@ static void thread_func(void *userdata) {
 
                 /* Convert from the sound card time domain to the
                  * system time domain */
-                cusec = pa_smoother_translate(u->smoother, pa_rtclock_usec(), sleep_usec);
+                cusec = pa_smoother_translate(u->smoother, pa_rtclock_now(), sleep_usec);
 
 /*                 pa_log_debug("Waking up in %0.2fms (system clock).", (double) cusec / PA_USEC_PER_MSEC); */
 
@@ -1431,7 +1431,7 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p
             TRUE,
             TRUE,
             5,
-            pa_rtclock_usec(),
+            pa_rtclock_now(),
             FALSE);
 
     dev_id = pa_modargs_get_value(
index 6bcd0b8..e0d4e48 100644 (file)
@@ -773,7 +773,7 @@ static int start_stream_fd(struct userdata *u) {
                 TRUE,
                 TRUE,
                 10,
-                pa_rtclock_usec(),
+                pa_rtclock_now(),
                 TRUE);
 
     return 0;
@@ -867,14 +867,14 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
             if (u->read_smoother) {
                 pa_usec_t wi, ri;
 
-                ri = pa_smoother_get(u->read_smoother, pa_rtclock_usec());
+                ri = pa_smoother_get(u->read_smoother, pa_rtclock_now());
                 wi = pa_bytes_to_usec(u->write_index + u->block_size, &u->sample_spec);
 
                 *((pa_usec_t*) data) = wi > ri ? wi - ri : 0;
             } else {
                 pa_usec_t ri, wi;
 
-                ri = pa_rtclock_usec() - u->started_at;
+                ri = pa_rtclock_now() - u->started_at;
                 wi = pa_bytes_to_usec(u->write_index, &u->sample_spec);
 
                 *((pa_usec_t*) data) = wi > ri ? wi - ri : 0;
@@ -912,7 +912,7 @@ static int source_process_msg(pa_msgobject *o, int code, void *data, int64_t off
                         stop_stream_fd(u);
 
                     if (u->read_smoother)
-                        pa_smoother_pause(u->read_smoother, pa_rtclock_usec());
+                        pa_smoother_pause(u->read_smoother, pa_rtclock_now());
                     break;
 
                 case PA_SOURCE_IDLE:
@@ -939,7 +939,7 @@ static int source_process_msg(pa_msgobject *o, int code, void *data, int64_t off
         case PA_SOURCE_MESSAGE_GET_LATENCY: {
             pa_usec_t wi, ri;
 
-            wi = pa_smoother_get(u->read_smoother, pa_rtclock_usec());
+            wi = pa_smoother_get(u->read_smoother, pa_rtclock_now());
             ri = pa_bytes_to_usec(u->read_index, &u->sample_spec);
 
             *((pa_usec_t*) data) = (wi > ri ? wi - ri : 0) + u->source->fixed_latency;
@@ -1086,7 +1086,7 @@ static int hsp_process_push(struct userdata *u) {
 
         if (!found_tstamp) {
             pa_log_warn("Couldn't find SO_TIMESTAMP data in auxiliary recvmsg() data!");
-            tstamp = pa_rtclock_usec();
+            tstamp = pa_rtclock_now();
         }
 
         pa_smoother_put(u->read_smoother, tstamp, pa_bytes_to_usec(u->read_index, &u->sample_spec));
@@ -1309,7 +1309,7 @@ static void thread_func(void *userdata) {
                     /* Hmm, there is no input stream we could synchronize
                      * to. So let's do things by time */
 
-                    time_passed = pa_rtclock_usec() - u->started_at;
+                    time_passed = pa_rtclock_now() - u->started_at;
                     audio_sent = pa_bytes_to_usec(u->write_index, &u->sample_spec);
 
                     if (audio_sent <= time_passed) {
@@ -1341,7 +1341,7 @@ static void thread_func(void *userdata) {
                     int n_written;
 
                     if (u->write_index <= 0)
-                        u->started_at = pa_rtclock_usec();
+                        u->started_at = pa_rtclock_now();
 
                     if (u->profile == PROFILE_A2DP) {
                         if ((n_written = a2dp_process_render(u)) < 0)
@@ -1361,7 +1361,7 @@ static void thread_func(void *userdata) {
                     /* Hmm, there is no input stream we could synchronize
                      * to. So let's estimate when we need to wake up the latest */
 
-                    time_passed = pa_rtclock_usec() - u->started_at;
+                    time_passed = pa_rtclock_now() - u->started_at;
                     next_write_at = pa_bytes_to_usec(u->write_index, &u->sample_spec);
                     sleep_for = time_passed < next_write_at ? next_write_at - time_passed : 0;
 
index 725faa0..69dc530 100644 (file)
@@ -282,7 +282,7 @@ static void thread_func(void *userdata) {
     pa_thread_mq_install(&u->thread_mq);
     pa_rtpoll_install(u->rtpoll);
 
-    u->thread_info.timestamp = pa_rtclock_usec();
+    u->thread_info.timestamp = pa_rtclock_now();
     u->thread_info.in_null_mode = FALSE;
 
     for (;;) {
@@ -296,7 +296,7 @@ static void thread_func(void *userdata) {
         if (PA_SINK_IS_OPENED(u->sink->thread_info.state) && !u->thread_info.active_outputs) {
             pa_usec_t now;
 
-            now = pa_rtclock_usec();
+            now = pa_rtclock_now();
 
             if (!u->thread_info.in_null_mode || u->thread_info.timestamp <= now)
                 process_render_null(u, now);
@@ -664,16 +664,16 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
             pa_atomic_store(&u->thread_info.running, PA_PTR_TO_UINT(data) == PA_SINK_RUNNING);
 
             if (PA_PTR_TO_UINT(data) == PA_SINK_SUSPENDED)
-                pa_smoother_pause(u->thread_info.smoother, pa_rtclock_usec());
+                pa_smoother_pause(u->thread_info.smoother, pa_rtclock_now());
             else
-                pa_smoother_resume(u->thread_info.smoother, pa_rtclock_usec(), TRUE);
+                pa_smoother_resume(u->thread_info.smoother, pa_rtclock_now(), TRUE);
 
             break;
 
         case PA_SINK_MESSAGE_GET_LATENCY: {
             pa_usec_t x, y, c, *delay = data;
 
-            x = pa_rtclock_usec();
+            x = pa_rtclock_now();
             y = pa_smoother_get(u->thread_info.smoother, x);
 
             c = pa_bytes_to_usec(u->thread_info.counter, &u->sink->sample_spec);
@@ -730,7 +730,7 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
         case SINK_MESSAGE_UPDATE_LATENCY: {
             pa_usec_t x, y, latency = (pa_usec_t) offset;
 
-            x = pa_rtclock_usec();
+            x = pa_rtclock_now();
             y = pa_bytes_to_usec(u->thread_info.counter, &u->sink->sample_spec);
 
             if (y > latency)
index 8cb25c5..d631da0 100644 (file)
@@ -145,14 +145,14 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
                 case PA_SINK_SUSPENDED:
                     pa_assert(PA_SINK_IS_OPENED(u->sink->thread_info.state));
 
-                    pa_smoother_pause(u->smoother, pa_rtclock_usec());
+                    pa_smoother_pause(u->smoother, pa_rtclock_now());
                     break;
 
                 case PA_SINK_IDLE:
                 case PA_SINK_RUNNING:
 
                     if (u->sink->thread_info.state == PA_SINK_SUSPENDED)
-                        pa_smoother_resume(u->smoother, pa_rtclock_usec(), TRUE);
+                        pa_smoother_resume(u->smoother, pa_rtclock_now(), TRUE);
 
                     break;
 
@@ -167,7 +167,7 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
         case PA_SINK_MESSAGE_GET_LATENCY: {
             pa_usec_t w, r;
 
-            r = pa_smoother_get(u->smoother, pa_rtclock_usec());
+            r = pa_smoother_get(u->smoother, pa_rtclock_now());
             w = pa_bytes_to_usec((uint64_t) u->offset + u->memchunk.length, &u->sink->sample_spec);
 
             *((pa_usec_t*) data) = w > r ? w - r : 0;
@@ -202,7 +202,7 @@ static void thread_func(void *userdata) {
     pa_thread_mq_install(&u->thread_mq);
     pa_rtpoll_install(u->rtpoll);
 
-    pa_smoother_set_time_offset(u->smoother, pa_rtclock_usec());
+    pa_smoother_set_time_offset(u->smoother, pa_rtclock_now());
 
     for (;;) {
         int ret;
@@ -295,7 +295,7 @@ static void thread_func(void *userdata) {
                 else
                     usec = 0;
 
-                pa_smoother_put(u->smoother, pa_rtclock_usec(), usec);
+                pa_smoother_put(u->smoother, pa_rtclock_now(), usec);
             }
 
             /* Hmm, nothing to do. Let's sleep */
index 30a99ca..8981d52 100644 (file)
@@ -101,14 +101,14 @@ static int sink_process_msg(
         case PA_SINK_MESSAGE_SET_STATE:
 
             if (PA_PTR_TO_UINT(data) == PA_SINK_RUNNING)
-                u->timestamp = pa_rtclock_usec();
+                u->timestamp = pa_rtclock_now();
 
             break;
 
         case PA_SINK_MESSAGE_GET_LATENCY: {
             pa_usec_t now;
 
-            now = pa_rtclock_usec();
+            now = pa_rtclock_now();
             *((pa_usec_t*) data) = u->timestamp > now ? u->timestamp - now : 0ULL;
 
             return 0;
@@ -210,7 +210,7 @@ static void thread_func(void *userdata) {
     pa_thread_mq_install(&u->thread_mq);
     pa_rtpoll_install(u->rtpoll);
 
-    u->timestamp = pa_rtclock_usec();
+    u->timestamp = pa_rtclock_now();
 
     for (;;) {
         int ret;
@@ -219,7 +219,7 @@ static void thread_func(void *userdata) {
         if (PA_SINK_IS_OPENED(u->sink->thread_info.state)) {
             pa_usec_t now;
 
-            now = pa_rtclock_usec();
+            now = pa_rtclock_now();
 
             if (u->sink->thread_info.rewind_requested) {
                 if (u->sink->thread_info.rewind_nbytes > 0)
index 14a04e4..9be4e19 100644 (file)
@@ -101,14 +101,14 @@ static int source_process_msg(
         case PA_SOURCE_MESSAGE_SET_STATE:
 
             if (PA_PTR_TO_UINT(data) == PA_SOURCE_RUNNING)
-                u->timestamp = pa_rtclock_usec();
+                u->timestamp = pa_rtclock_now();
 
             break;
 
         case PA_SOURCE_MESSAGE_GET_LATENCY: {
             pa_usec_t now, left_to_fill;
 
-            now = pa_rtclock_usec();
+            now = pa_rtclock_now();
             left_to_fill = u->timestamp > now ? u->timestamp - now : 0ULL;
 
             *((pa_usec_t*) data) = u->block_usec > left_to_fill ? u->block_usec - left_to_fill : 0ULL;
@@ -168,7 +168,7 @@ static void thread_func(void *userdata) {
     pa_thread_mq_install(&u->thread_mq);
     pa_rtpoll_install(u->rtpoll);
 
-    u->timestamp = pa_rtclock_usec();
+    u->timestamp = pa_rtclock_now();
 
     for (;;) {
         int ret;
@@ -176,7 +176,7 @@ static void thread_func(void *userdata) {
         if (PA_SOURCE_IS_OPENED(u->source->thread_info.state)) {
             pa_usec_t now;
 
-            now = pa_rtclock_usec();
+            now = pa_rtclock_now();
 
             if (u->timestamp <= now)
                 process_render(u, now);
index 5cfa97a..08fe6f5 100644 (file)
@@ -641,7 +641,7 @@ static void thread_func(void *userdata) {
                  * Since we cannot modify the size of the output buffer we fake it
                  * by not filling it more than u->buffer_size.
                  */
-                xtime0 = pa_rtclock_usec();
+                xtime0 = pa_rtclock_now();
                 buffered_bytes = get_playback_buffered_bytes(u);
                 if (buffered_bytes >= (uint64_t)u->buffer_size)
                     break;
index c493d9b..60498ad 100644 (file)
@@ -395,7 +395,7 @@ static void check_smoother_status(struct userdata *u, pa_bool_t past)  {
 
     pa_assert(u);
 
-    x = pa_rtclock_usec();
+    x = pa_rtclock_now();
 
     /* Correct by the time the requested issued needs to travel to the
      * other side.  This is a valid thread-safe access, because the
@@ -500,7 +500,7 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
             pa_usec_t yl, yr, *usec = data;
 
             yl = pa_bytes_to_usec((uint64_t) u->counter, &u->sink->sample_spec);
-            yr = pa_smoother_get(u->smoother, pa_rtclock_usec());
+            yr = pa_smoother_get(u->smoother, pa_rtclock_now());
 
             *usec = yl > yr ? yl - yr : 0;
             return 0;
@@ -533,7 +533,7 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
             else
                 y = 0;
 
-            pa_smoother_put(u->smoother, pa_rtclock_usec(), y);
+            pa_smoother_put(u->smoother, pa_rtclock_now(), y);
 
             /* We can access this freely here, since the main thread is waiting for us */
             u->thread_transport_usec = u->transport_usec;
@@ -607,7 +607,7 @@ static int source_process_msg(pa_msgobject *o, int code, void *data, int64_t off
             pa_usec_t yr, yl, *usec = data;
 
             yl = pa_bytes_to_usec((uint64_t) u->counter, &PA_SOURCE(o)->sample_spec);
-            yr = pa_smoother_get(u->smoother, pa_rtclock_usec());
+            yr = pa_smoother_get(u->smoother, pa_rtclock_now());
 
             *usec = yr > yl ? yr - yl : 0;
             return 0;
@@ -633,7 +633,7 @@ static int source_process_msg(pa_msgobject *o, int code, void *data, int64_t off
             y = pa_bytes_to_usec((uint64_t) u->counter, &u->source->sample_spec);
             y += (pa_usec_t) offset;
 
-            pa_smoother_put(u->smoother, pa_rtclock_usec(), y);
+            pa_smoother_put(u->smoother, pa_rtclock_now(), y);
 
             /* We can access this freely here, since the main thread is waiting for us */
             u->thread_transport_usec = u->transport_usec;
@@ -1825,7 +1825,7 @@ int pa__init(pa_module*m) {
             TRUE,
             TRUE,
             10,
-            pa_rtclock_usec(),
+            pa_rtclock_now(),
             FALSE);
     u->ctag = 1;
     u->device_index = u->channel = PA_INVALID_INDEX;
index 54de42c..0e6b9d4 100644 (file)
@@ -181,7 +181,7 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
                 case PA_SINK_SUSPENDED:
                     pa_assert(PA_SINK_IS_OPENED(u->sink->thread_info.state));
 
-                    pa_smoother_pause(u->smoother, pa_rtclock_usec());
+                    pa_smoother_pause(u->smoother, pa_rtclock_now());
 
                     /* Issue a FLUSH if we are connected */
                     if (u->fd >= 0) {
@@ -193,7 +193,7 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
                 case PA_SINK_RUNNING:
 
                     if (u->sink->thread_info.state == PA_SINK_SUSPENDED) {
-                        pa_smoother_resume(u->smoother, pa_rtclock_usec(), TRUE);
+                        pa_smoother_resume(u->smoother, pa_rtclock_now(), TRUE);
 
                         /* The connection can be closed when idle, so check to
                            see if we need to reestablish it */
@@ -216,7 +216,7 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
         case PA_SINK_MESSAGE_GET_LATENCY: {
             pa_usec_t w, r;
 
-            r = pa_smoother_get(u->smoother, pa_rtclock_usec());
+            r = pa_smoother_get(u->smoother, pa_rtclock_now());
             w = pa_bytes_to_usec((u->offset - u->encoding_overhead + (u->encoded_memchunk.length / u->encoding_ratio)), &u->sink->sample_spec);
 
             *((pa_usec_t*) data) = w > r ? w - r : 0;
@@ -325,7 +325,7 @@ static void thread_func(void *userdata) {
     pa_thread_mq_install(&u->thread_mq);
     pa_rtpoll_install(u->rtpoll);
 
-    pa_smoother_set_time_offset(u->smoother, pa_rtclock_usec());
+    pa_smoother_set_time_offset(u->smoother, pa_rtclock_now());
 
     /* Create a chunk of memory that is our encoded silence sample. */
     pa_memchunk_reset(&silence);
@@ -465,7 +465,7 @@ static void thread_func(void *userdata) {
                 else
                     usec = 0;
 
-                pa_smoother_put(u->smoother, pa_rtclock_usec(), usec);
+                pa_smoother_put(u->smoother, pa_rtclock_now(), usec);
             }
 
             /* Hmm, nothing to do. Let's sleep */
index b86923f..5a93592 100644 (file)
@@ -193,7 +193,7 @@ static void sink_input_suspend_within_thread(pa_sink_input* i, pa_bool_t b) {
     pa_assert_se(s = i->userdata);
 
     if (b) {
-        pa_smoother_pause(s->smoother, pa_rtclock_usec());
+        pa_smoother_pause(s->smoother, pa_rtclock_now());
         pa_memblockq_flush_read(s->memblockq);
     } else
         s->first_packet = FALSE;
index 339a89e..8df8a5e 100644 (file)
@@ -373,7 +373,7 @@ static void check_smoother_status(pa_stream *s, pa_bool_t aposteriori, pa_bool_t
     if (!s->smoother)
         return;
 
-    x = pa_rtclock_usec();
+    x = pa_rtclock_now();
 
     if (s->timing_info_valid) {
         if (aposteriori)
@@ -1057,7 +1057,7 @@ static int create_stream(
     if (flags & PA_STREAM_INTERPOLATE_TIMING) {
         pa_usec_t x;
 
-        x = pa_rtclock_usec();
+        x = pa_rtclock_now();
 
         pa_assert(!s->smoother);
         s->smoother = pa_smoother_new(
@@ -1594,7 +1594,7 @@ static void stream_get_timing_info_callback(pa_pdispatch *pd, uint32_t command,
         if (o->stream->smoother) {
             pa_usec_t u, x;
 
-            u = x = pa_rtclock_usec() - i->transport_usec;
+            u = x = pa_rtclock_now() - i->transport_usec;
 
             if (o->stream->direction == PA_STREAM_PLAYBACK && o->context->version >= 13) {
                 pa_usec_t su;
@@ -2103,7 +2103,7 @@ int pa_stream_get_time(pa_stream *s, pa_usec_t *r_usec) {
     PA_CHECK_VALIDITY(s->context, s->direction != PA_STREAM_RECORD || !s->timing_info.write_index_corrupt, PA_ERR_NODATA);
 
     if (s->smoother)
-        usec = pa_smoother_get(s->smoother, pa_rtclock_usec());
+        usec = pa_smoother_get(s->smoother, pa_rtclock_now());
     else
         usec = calc_time(s, FALSE);
 
index 15d192d..acff981 100644 (file)
@@ -294,7 +294,7 @@ void pa_log_levelv_meta(
         static pa_usec_t start, last;
         pa_usec_t u, a, r;
 
-        u = pa_rtclock_usec();
+        u = pa_rtclock_now();
 
         PA_ONCE_BEGIN {
             start = u;
index e913ca1..f00587a 100644 (file)
@@ -38,7 +38,7 @@ pa_bool_t pa_ratelimit_test(pa_ratelimit *r) {
     pa_usec_t now;
     pa_mutex *m;
 
-    now = pa_rtclock_usec();
+    now = pa_rtclock_now();
 
     m = pa_static_mutex_get(&mutex, FALSE, FALSE);
     pa_mutex_lock(m);
index 65c826a..53c0258 100644 (file)
@@ -122,7 +122,7 @@ void pa_rtclock_hrtimer_enable(void) {
 #endif
 }
 
-pa_usec_t pa_rtclock_usec(void) {
+pa_usec_t pa_rtclock_now(void) {
     struct timeval tv;
 
     return pa_timeval_load(pa_rtclock_get(&tv));
index 03cc1c7..b8a588c 100644 (file)
@@ -31,7 +31,7 @@ struct timeval;
 
 struct timeval *pa_rtclock_get(struct timeval *ts);
 
-pa_usec_t pa_rtclock_usec(void);
+pa_usec_t pa_rtclock_now(void);
 
 pa_usec_t pa_rtclock_age(const struct timeval *tv);
 pa_bool_t pa_rtclock_hrtimer(void);
index aa8ca32..006b93f 100644 (file)
@@ -160,7 +160,7 @@ pa_rtpoll *pa_rtpoll_new(void) {
     PA_LLIST_HEAD_INIT(pa_rtpoll_item, p->items);
 
 #ifdef DEBUG_TIMING
-    p->timestamp = pa_rtclock_usec();
+    p->timestamp = pa_rtclock_now();
     p->slept = p->awake = 0;
 #endif
 
@@ -394,7 +394,7 @@ int pa_rtpoll_run(pa_rtpoll *p, pa_bool_t wait) {
 
 #ifdef DEBUG_TIMING
     {
-        pa_usec_t now = pa_rtclock_usec();
+        pa_usec_t now = pa_rtclock_now();
         p->awake = now - p->timestamp;
         p->timestamp = now;
     }
@@ -421,7 +421,7 @@ int pa_rtpoll_run(pa_rtpoll *p, pa_bool_t wait) {
 
 #ifdef DEBUG_TIMING
     {
-        pa_usec_t now = pa_rtclock_usec();
+        pa_usec_t now = pa_rtclock_now();
         p->slept = now - p->timestamp;
         p->timestamp = now;