Skip to content

Commit

Permalink
[DOC] Document Process::Tms
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Jun 28, 2022
1 parent 131422c commit 5e66525
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion process.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ int initgroups(const char *, rb_gid_t);
#endif

#if defined(HAVE_TIMES) || defined(_WIN32)
/*********************************************************************
*
* Document-class: Process::Tms
*
* Placeholder for rusage
*/
static VALUE rb_cProcessTms;
#endif

Expand Down Expand Up @@ -9124,8 +9130,17 @@ InitVM_process(void)
rb_define_module_function(rb_mProcess, "clock_getres", rb_clock_getres, -1);

#if defined(HAVE_TIMES) || defined(_WIN32)
/* Placeholder for rusage */
rb_cProcessTms = rb_struct_define_under(rb_mProcess, "Tms", "utime", "stime", "cutime", "cstime", NULL);
#if 0 /* for RDoc */
/* user time used in this process */
rb_define_attr(rb_cProcessTms, "utime", TRUE, TRUE);
/* system time used in this process */
rb_define_attr(rb_cProcessTms, "stime", TRUE, TRUE);
/* user time used in the child processes */
rb_define_attr(rb_cProcessTms, "cutime", TRUE, TRUE);
/* system time used in the child processes */
rb_define_attr(rb_cProcessTms, "cstime", TRUE, TRUE);
#endif
#endif

SAVED_USER_ID = geteuid();
Expand Down

0 comments on commit 5e66525

Please sign in to comment.