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 | 7913998c4ba9b7d8ff6868b2a8e05a566fbb8042 (patch) | |
tree | 19695de6e019db3de0200ed625440f70af7572b7 /media | |
parent | f0cfe3438aea77b5193d94fb9fa0c8d37972b194 (diff) | |
download | frameworks_base-7913998c4ba9b7d8ff6868b2a8e05a566fbb8042.zip frameworks_base-7913998c4ba9b7d8ff6868b2a8e05a566fbb8042.tar.gz frameworks_base-7913998c4ba9b7d8ff6868b2a8e05a566fbb8042.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); } } } |