From bf4148f4351584bc97b26d8efc7bea74c2ab1b8a Mon Sep 17 00:00:00 2001 From: EliteTK Date: Tue, 7 Oct 2014 23:35:09 +0100 Subject: Added GPL header to files (which I'm mostly sure I wrote) Resolves #1 --- rewrite-test.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 rewrite-test.c (limited to 'rewrite-test.c') diff --git a/rewrite-test.c b/rewrite-test.c new file mode 100644 index 0000000..20e3a27 --- /dev/null +++ b/rewrite-test.c @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2014 Tomasz Kramkowski + * + * This program is free software. It is licensed under version 3 of the + * GNU General Public License. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see [http://www.gnu.org/licenses/]. + */ + +#include +#include +#include + +int main(int argc, char **argv) +{ + struct timespec tsp = { + .tv_sec = 0, + .tv_nsec = 500*1000*1000 + }; + + while (true) { + static int i = 0; + printf("\r%d", i); + fflush(stdout); + nanosleep(&tsp, NULL); + i++; + } + return 0; +} -- cgit v1.2.3-54-g00ecf