1#include <stdio.h> 2#include <stdlib.h> 3#include <time.h> 4#include <unistd.h> 5 6#include <rumprun/tester.h> 7 8#if defined(__linux__) || !defined(__NetBSD__) 9# error compiler wrapper fail 10#endif 11 12int 13rumprun_test(int argc, char *argv[]) 14{ 15 char *world = getenv("WORLD"); 16 time_t now; 17 18 if (world) 19 printf ("Hello, %s!\n", world); 20 else 21 printf ("Hello, world!\n"); 22 23 now = time(NULL); 24 printf("When you do not hear the beep the time will be exactly:\n%s", 25 ctime(&now)); 26 27 printf("Sleeping 1s...\n"); 28 sleep(1); 29 30 now = time(NULL); 31 printf("Goodbye, world, precisely at:\n%s", ctime(&now)); 32 33 return 0; 34} 35