mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* process.c (rb_proc_times): need to initialize first.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5f075c2fda
commit
41c46ceade
2 changed files with 9 additions and 8 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Fri Jan 3 22:26:07 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||||
|
|
||||||
|
* process.c (rb_proc_times): need to initialize first.
|
||||||
|
|
||||||
Thu Jan 02 11:01:20 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
Thu Jan 02 11:01:20 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||||
|
|
||||||
* eval.c (bmcall): arguments should be an array.
|
* eval.c (bmcall): arguments should be an array.
|
||||||
|
|
13
process.c
13
process.c
|
@ -1261,17 +1261,14 @@ rb_proc_times(obj)
|
||||||
# endif
|
# endif
|
||||||
#endif /* HZ */
|
#endif /* HZ */
|
||||||
struct tms buf;
|
struct tms buf;
|
||||||
VALUE volatile utime = rb_float_new((double)buf.tms_utime / HZ);
|
volatile VALUE utime, stime, cutime, sctime;
|
||||||
VALUE volatile stime = rb_float_new((double)buf.tms_stime / HZ);
|
|
||||||
VALUE volatile cutime = rb_float_new((double)buf.tms_cutime / HZ);
|
|
||||||
VALUE volatile sctime = rb_float_new((double)buf.tms_cstime / HZ);
|
|
||||||
|
|
||||||
times(&buf);
|
times(&buf);
|
||||||
return rb_struct_new(S_Tms,
|
return rb_struct_new(S_Tms,
|
||||||
utime,
|
utime = rb_float_new((double)buf.tms_utime / HZ),
|
||||||
stime,
|
stime = rb_float_new((double)buf.tms_stime / HZ),
|
||||||
cutime,
|
cutime = rb_float_new((double)buf.tms_cutime / HZ),
|
||||||
sctime);
|
sctime = rb_float_new((double)buf.tms_cstime / HZ));
|
||||||
#else
|
#else
|
||||||
rb_notimplement();
|
rb_notimplement();
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue