i wrote this code to blink 8 leds! but its not working! can anyone define me why? HELP
Code:
#include<stdio.h>
#include<time.h>
const int DELAY_TIME = 1;
const int RUNNING_TIME = 30;
int main() {
long long int start = time(NULL);
long long int MWANZO = time(NULL);
int timer = DELAY_TIME;
while((time(NULL)-MWANZO)<RUNNING_TIME){
int K, L;
for(K=1; K<=8; K++){
do {
if(timer == DELAY_TIME) {
timer = 0;
start = timer(NULL);
for(L=1; L<=8; L++){
if(L==K) printf("\t0");
else printf("\t.");
}
printf("\n\n")
}else{
timer = time(NULL) - start;
}
} while(timer != DELAY_TIME);
}
}
}