maybe somthing like this..
Code:
void delay(unsigned int seconds)
{
unsigned int current = 0;
while (current < (seconds * 1000) / 26.4) // Seconds * 1000 to get milliseconds and then / 26.4 millisecond loop
{
getdata(); // forget what parameter getdata takes
current++;
putdata(); // forget what parameter putdata takes..
}
}
I have no idea if that will work but you can try it..