diff options
author | wtc%netscape.com <devnull@localhost> | 1998-09-25 20:34:39 +0000 |
---|---|---|
committer | wtc%netscape.com <devnull@localhost> | 1998-09-25 20:34:39 +0000 |
commit | a5cf3a954c0d28455f78eaffcd2067e961972933 (patch) | |
tree | cf0a94361c04135067133f9c138577166fbbb0be /pr/tests/parent.c | |
parent | 299a8c91a9d819a6d8e38032447c052271fc41e8 (diff) | |
download | nspr-hg-a5cf3a954c0d28455f78eaffcd2067e961972933.tar.gz |
NSPR20 v3.0 beta landing from NSPRPUB_RELEASE_3_0_LANDING_BRANCH.
Diffstat (limited to 'pr/tests/parent.c')
-rw-r--r-- | pr/tests/parent.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pr/tests/parent.c b/pr/tests/parent.c index 4e82b8b0..d5fef9ec 100644 --- a/pr/tests/parent.c +++ b/pr/tests/parent.c @@ -26,6 +26,7 @@ #include "prprf.h" #include "prinit.h" #include "prproces.h" +#include "prinrval.h" typedef struct Child { @@ -44,6 +45,7 @@ PRIntn main (PRIntn argc, char **argv) { PRStatus rv; PRInt32 test_status = 1; + PRIntervalTime t_start, t_elapsed; PRFileDesc *debug = NULL; Child *child = PR_NEWZAP(Child); @@ -83,14 +85,22 @@ PRIntn main (PRIntn argc, char **argv) child->attr, PR_StandardError, PR_GetSpecialFD(PR_StandardError)); + t_start = PR_IntervalNow(); child->process = PR_CreateProcess( child->name, argv, NULL, child->attr); + t_elapsed = (PRIntervalTime) (PR_IntervalNow() - t_start); test_status = (NULL == child->process) ? 1 : 0; if (NULL != debug) + { PR_fprintf( debug, "Child was %sforked\n", (0 == test_status) ? "" : "NOT "); + if (0 == test_status) + PR_fprintf( + debug, "PR_CreateProcess took %lu microseconds\n", + PR_IntervalToMicroseconds(t_elapsed)); + } if (0 == test_status) { |