find:: get rid of nested function (it's a gcc-ism)
[oweals/busybox.git] / miscutils / time.c
index 6b1c3c42c8e2aee336b0cb40fdf807944a536d7a..19b0b44c91c0ba406d0f06135257cb5f4abc0f98 100644 (file)
@@ -9,7 +9,14 @@
    Heavily modified for busybox by Erik Andersen <andersen@codepoet.org>
 */
 
+//usage:#define time_trivial_usage
+//usage:       "[-v] PROG ARGS"
+//usage:#define time_full_usage "\n\n"
+//usage:       "Run PROG, display resource usage when it exits\n"
+//usage:     "\n       -v      Verbose"
+
 #include "libbb.h"
+#include <sys/resource.h> /* getrusage */
 
 /* Information on the resources used by a child process.  */
 typedef struct {
@@ -63,7 +70,7 @@ static void resuse_end(pid_t pid, resource_t *resp)
        pid_t caught;
 
        /* Ignore signals, but don't ignore the children.  When wait3
-          returns the child process, set the time the command finished. */
+        * returns the child process, set the time the command finished. */
        while ((caught = wait3(&resp->waitstatus, 0, &resp->ru)) != pid) {
                if (caught == -1 && errno != EINTR) {
                        bb_perror_msg("wait");