/* async.c - C file for the asynchronous IPC example. */

#include "stdio.h"
#define PIPEBUFF  4096

main(argc, argv)
int argc;
char **argv;
{
   char s[PIPEBUFF];
   int timeElapsed, status;

   for( timeElapsed = 0 ; timeElapsed <= 60 ; 
      timeElapsed++ ) {

      /* Write time elapsed to stdout */
      sprintf(s, "time %d\n", timeElapsed ); 
      status = write(fileno(stdout), s, strlen(s)); 
      sleep(1);
   } 
   sprintf(s, "%s", "done \n");
   status = write(fileno(stdout), s, strlen(s));
   sleep(3);
   exit(0);
}
