summary refs log tree commit diff
path: root/Src/zsh.h
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2004-10-07 09:45:43 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2004-10-07 09:45:43 +0000
commitcc7274077564befa7426909e7c70f6de0169fa5e (patch)
tree30f3787cfc9bf3314c6fa9ea49229c6dd071020c /Src/zsh.h
parent0f7a3eaca59794030cd09b4c4518f7d970351d9e (diff)
downloadzsh-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.h11
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                  */
 };