Skip to content

Instantly share code, notes, and snippets.

@maltzsama
Created December 16, 2013 23:05
Show Gist options
  • Select an option

  • Save maltzsama/7996324 to your computer and use it in GitHub Desktop.

Select an option

Save maltzsama/7996324 to your computer and use it in GitHub Desktop.
teste de delay em microcontroladores PIC
#define DELAY 4
#include <time.h>
#include <stdio.h>
int main(void)
{
time_t begin, end;
end = begin = time(NULL);
printf("blah blah");
while ((end - begin) < DELAY)
{
end = time(NULL);
}
printf("blah blah blah");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment