f.e. call SaveLoop(2); once and save(); gets called every 2 seconds without affecting the rest of your code.
Thank you very much! I tryed something simmilar, but my mistake was to call the function in my while(1) - so it was called every few miliseconds. But now I moved it to main and it does exactly what it should! Thanks again!