diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2004-10-07 09:45:43 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2004-10-07 09:45:43 +0000 |
commit | cc7274077564befa7426909e7c70f6de0169fa5e (patch) | |
tree | 30f3787cfc9bf3314c6fa9ea49229c6dd071020c /Src/zsh.h | |
parent | 0f7a3eaca59794030cd09b4c4518f7d970351d9e (diff) | |
download | zsh-cc7274077564befa7426909e7c70f6de0169fa5e.tar.gz zsh-cc7274077564befa7426909e7c70f6de0169fa5e.tar.xz zsh-cc7274077564befa7426909e7c70f6de0169fa5e.zip |
20462: Use getrusage for timing again.
Time processes from before rather than after fork.
Diffstat (limited to 'Src/zsh.h')
-rw-r--r-- | Src/zsh.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Src/zsh.h b/Src/zsh.h index b11e8f1e8..bde274d9b 100644 --- a/Src/zsh.h +++ b/Src/zsh.h @@ -739,12 +739,21 @@ struct timeinfo { /* node in job process lists */ +#ifdef HAVE_GETRUSAGE +typedef struct { + struct timeval sys; + struct timeval usr; +} child_times_t; +#else +typedef struct timeinfo child_times_t; +#endif + struct process { struct process *next; pid_t pid; /* process id */ char text[JOBTEXTSIZE]; /* text to print when 'jobs' is run */ int status; /* return code from waitpid/wait3() */ - struct timeinfo ti; + child_times_t ti; struct timeval bgtime; /* time job was spawned */ struct timeval endtime; /* time job exited */ }; |