~ubuntu-branches/ubuntu/vivid/mir/vivid

« back to all changes in this revision

Viewing changes to src/common/input/android/android_input_receiver.cpp

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release
  • Date: 2014-11-20 16:41:15 UTC
  • mto: This revision was merged to the branch mainline in revision 86.
  • Revision ID: package-import@ubuntu.com-20141120164115-a3j4vq6cq2u78m47
Tags: upstream-0.9.0+15.04.20141120.1
ImportĀ upstreamĀ versionĀ 0.9.0+15.04.20141120.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
153
153
        // But the batch won't get flushed until the next frame interval,
154
154
        // so be sure to use a non-zero sleep time to avoid spinning the CPU
155
155
        // for the whole interval...
156
 
        reduced_timeout = std::chrono::milliseconds(1);
 
156
 
 
157
        // During tests with mocked clocks we may already have zero...
 
158
        if (reduced_timeout != std::chrono::milliseconds::zero())
 
159
            reduced_timeout = std::chrono::milliseconds(1);
157
160
    }
158
161
 
159
162
    auto result = looper->pollOnce(reduced_timeout.count());