зеркало из https://github.com/github/ruby.git
* 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
This commit is contained in:
Родитель
1a5f1a8c69
Коммит
3b9329e984
|
@ -1,3 +1,7 @@
|
|||
Thu Jul 10 12:41:56 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* thread.c (rb_thread_wait_for): fixed variable name.
|
||||
|
||||
Thu Jul 10 12:09:58 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* vm_core.h (rb_thread_t), vm.c (rb_thread_mark), process.c
|
||||
|
|
12
thread.c
12
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче