diff options
author | Nipun Kwatra <nkwatra@google.com> | 2010-08-10 12:08:17 -0700 |
---|---|---|
committer | Nipun Kwatra <nkwatra@google.com> | 2010-08-10 12:08:17 -0700 |
commit | 7dbfa5a98c9f396ea63d0f322c3fa11df91d17a2 (patch) | |
tree | 26bae15868f9dd19dfc8c7d1a3d859c39a0f3d77 /media | |
parent | 782aef17c9921a3bf401a0432878df5031f2328b (diff) | |
download | frameworks_av-7dbfa5a98c9f396ea63d0f322c3fa11df91d17a2.zip frameworks_av-7dbfa5a98c9f396ea63d0f322c3fa11df91d17a2.tar.gz frameworks_av-7dbfa5a98c9f396ea63d0f322c3fa11df91d17a2.tar.bz2 |
use usleep instead of sleep.
Minor bugfix. sleep doesn't take fractional value for seconds, so use
usleep instead of sleep for sleeping small times.
Change-Id: I40e45c30cc595a54c18601117b9a1a3637652f60
Diffstat (limited to 'media')
-rw-r--r-- | media/libstagefright/CameraSourceTimeLapse.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/media/libstagefright/CameraSourceTimeLapse.cpp b/media/libstagefright/CameraSourceTimeLapse.cpp index 23d8f56..1fd256a 100644 --- a/media/libstagefright/CameraSourceTimeLapse.cpp +++ b/media/libstagefright/CameraSourceTimeLapse.cpp @@ -149,10 +149,10 @@ void CameraSourceTimeLapse::threadTimeLapseEntry() { LOGV("threadTimeLapseEntry: taking picture"); CHECK_EQ(OK, mCamera->takePicture()); mCameraIdle = false; - sleep(mTimeBetweenTimeLapseFrameCaptureUs/1E6); + usleep(mTimeBetweenTimeLapseFrameCaptureUs); } else { LOGV("threadTimeLapseEntry: camera busy with old takePicture. Sleeping a little."); - sleep(.01); + usleep(1E4); } } } |