diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2014-11-15 20:56:40 +0100 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2014-11-15 20:56:40 +0100 |
commit | 9594857ea2b95675fc8c393aa4da21baa3d0f7f8 (patch) | |
tree | 20322af94fb9d25119b84500601d423360853b84 /src/workertest.c | |
parent | 8a008f55fa16b4388e49a21301bf84c7e4a2b2f7 (diff) | |
download | biruda-9594857ea2b95675fc8c393aa4da21baa3d0f7f8.tar.gz biruda-9594857ea2b95675fc8c393aa4da21baa3d0f7f8.tar.bz2 |
..
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; +} |