OSDN Git Service

Replace obsolete CLOCK_MONOTONIC_HR by CLOCK_MONOTONIC
authorGlenn Kasten <gkasten@google.com>
Fri, 10 May 2013 16:29:51 +0000 (09:29 -0700)
committerElliott Hughes <enh@google.com>
Tue, 14 May 2013 21:38:51 +0000 (14:38 -0700)
(cherry-pick of da1a325bc0a1421f4233e62704da4fab8b0acf7b.)

Bug: 8895727
Change-Id: I29d5dcf8519600fdd2910345449c66a5c1284646

services/audioflinger/test-resample.cpp

index b082e8c..7a314cf 100644 (file)
@@ -219,12 +219,12 @@ int main(int argc, char* argv[]) {
 
         memset(output_vaddr, 0, output_size);
         timespec start, end;
-        clock_gettime(CLOCK_MONOTONIC_HR, &start);
+        clock_gettime(CLOCK_MONOTONIC, &start);
         resampler->resample((int*) output_vaddr, out_frames, &provider);
         resampler->resample((int*) output_vaddr, out_frames, &provider);
         resampler->resample((int*) output_vaddr, out_frames, &provider);
         resampler->resample((int*) output_vaddr, out_frames, &provider);
-        clock_gettime(CLOCK_MONOTONIC_HR, &end);
+        clock_gettime(CLOCK_MONOTONIC, &end);
         int64_t start_ns = start.tv_sec * 1000000000LL + start.tv_nsec;
         int64_t end_ns = end.tv_sec * 1000000000LL + end.tv_nsec;
         int64_t time = (end_ns - start_ns)/4;