summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-10 03:42:02 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-10 03:42:02 +0000
commit3b9329e98467e01224bafc258ddac556332d3986 (patch)
tree2e5aca1e4768b6a064ff29243d15cbe7d90df136 /thread.c
parent1a5f1a8c6966a973b26b85cb6e1e65ad0c5a5ed1 (diff)
* thread.c (rb_thread_wait_for): fixed variable name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/thread.c b/thread.c
index 3bee915cfb..65c1706f8b 100644
--- a/thread.c
+++ b/thread.c
@@ -792,8 +792,8 @@ rb_thread_wait_for(struct timeval time)
struct timeval to, tvn;
getclockofday(&to);
- to.tv_sec += tv.tv_sec;
- if ((to.tv_usec += tv.tv_usec) >= 1000000) {
+ to.tv_sec += time.tv_sec;
+ if ((to.tv_usec += time.tv_usec) >= 1000000) {
to.tv_sec++;
to.tv_usec -= 1000000;
}
@@ -806,10 +806,10 @@ rb_thread_wait_for(struct timeval time)
thread_debug("sleep_timeval: %ld.%.6ld > %ld.%.6ld\n",
(long)to.tv_sec, to.tv_usec,
(long)tvn.tv_sec, tvn.tv_usec);
- tv.tv_sec = to.tv_sec - tvn.tv_sec;
- if ((tv.tv_usec = to.tv_usec - tvn.tv_usec) < 0) {
- --tv.tv_sec;
- tv.tv_usec += 1000000;
+ time.tv_sec = to.tv_sec - tvn.tv_sec;
+ if ((time.tv_usec = to.tv_usec - tvn.tv_usec) < 0) {
+ --time.tv_sec;
+ time.tv_usec += 1000000;
}
}
}