diff options
Diffstat (limited to 'src/workertest.c')
-rw-r--r-- | src/workertest.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/workertest.c b/src/workertest.c new file mode 100644 index 0000000..ecc980e --- /dev/null +++ b/src/workertest.c @@ -0,0 +1,26 @@ +#include <stdio.h> + +#include "port.h" + +#define RUN_TIME 60 + +int main( void ) +{ + for( int i = 0; i < RUN_TIME; i++ ) { + char msg[1024]; + + snprintf( msg, sizeof( msg ), "Msg %d\n", i ); + + if( i % 3 == 0 ) { + fputs( msg, stderr ); + fflush( stderr ); + } else { + fputs( msg, stdout ); + fflush( stdout ); + } + + sleep( 1 ); + } + + return 0; +} |