Skip to content

Instantly share code, notes, and snippets.

@bierbaum
Created August 28, 2012 00:50
Show Gist options
  • Save bierbaum/3493941 to your computer and use it in GitHub Desktop.
Save bierbaum/3493941 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <unistd.h>
int main(void) {
setbuf(stdout, NULL);
char *c = "\\-/|";
for (int i = 0; i < 4; i = (i == 3) ? 0 : i + 1) {
putc(c[i], stdout);
usleep(12000);
putc('\r', stdout);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment