TetaTricks/code/C/slowprint.c
2023-02-11 12:19:00 +01:00

21 lines
271 B
C

#include <stdio.h>
#include <time.h>
#include <unistd.h>
int main(int argc, char *argv[])
{
int c;
struct timespec ts;
ts.tv_sec = 0;
ts.tv_nsec = 115 * 1000 * 1000;
while ( EOF != (c=getchar()) )
{
putchar(c);
fflush(stdout);
nanosleep(&ts, NULL);
}
return 0;
}