Address comments from previous review round for rtc::Event.
R=andresp@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/35049004
Cr-Commit-Position: refs/heads/master@{#8313}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8313 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/base/event.cc b/webrtc/base/event.cc
index 7cd9443..999db38 100644
--- a/webrtc/base/event.cc
+++ b/webrtc/base/event.cc
@@ -46,8 +46,8 @@
ResetEvent(event_handle_);
}
-bool Event::Wait(int cms) {
- DWORD ms = (cms == kForever) ? INFINITE : cms;
+bool Event::Wait(int milliseconds) {
+ DWORD ms = (milliseconds == kForever) ? INFINITE : milliseconds;
return (WaitForSingleObject(event_handle_, ms) == WAIT_OBJECT_0);
}
@@ -78,11 +78,11 @@
pthread_mutex_unlock(&event_mutex_);
}
-bool Event::Wait(int cms) {
+bool Event::Wait(int milliseconds) {
pthread_mutex_lock(&event_mutex_);
int error = 0;
- if (cms != kForever) {
+ if (milliseconds != kForever) {
// Converting from seconds and microseconds (1e-6) plus
// milliseconds (1e-3) to seconds and nanoseconds (1e-9).
@@ -90,14 +90,14 @@
#if HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE
// Use relative time version, which tends to be more efficient for
// pthread implementations where provided (like on Android).
- ts.tv_sec = cms / 1000;
- ts.tv_nsec = (cms % 1000) * 1000000;
+ ts.tv_sec = milliseconds / 1000;
+ ts.tv_nsec = (milliseconds % 1000) * 1000000;
#else
struct timeval tv;
gettimeofday(&tv, NULL);
- ts.tv_sec = tv.tv_sec + (cms / 1000);
- ts.tv_nsec = tv.tv_usec * 1000 + (cms % 1000) * 1000000;
+ ts.tv_sec = tv.tv_sec + (milliseconds / 1000);
+ ts.tv_nsec = tv.tv_usec * 1000 + (milliseconds % 1000) * 1000000;
// Handle overflow.
if (ts.tv_nsec >= 1000000000) {