Last active
August 29, 2015 14:07
-
-
Save jadudm/3b9187a0f9277364164d to your computer and use it in GitHub Desktop.
A simple loop...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
/* Provides a way to sleep for microseconds */ | |
#include <unistd.h> | |
/* But, I want MILLIseconds... */ | |
#define MILLIS 1000 | |
/* Like this: | |
usleep(500 * MILLIS); | |
*/ | |
int main () { | |
for (int i = 0; i < 256; i++) { | |
printf ("%d\n", i); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: | |
gcc -o demo -std=gnu99 demo.c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment