Skip to content

Instantly share code, notes, and snippets.

@tapin13
tapin13 / timer.c
Created October 7, 2019 08:45
Time delay in C
#include <stdio.h>
#include <time.h>
void delay(int number_of_seconds) {
int milli_seconds = CLOCKS_PER_SEC * number_of_seconds;
clock_t start_time = clock();
while (clock() < start_time + milli_seconds) {}
}
@tapin13
tapin13 / abc
Created January 22, 2018 22:41
bcd