Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <time.h>
- void sleep(clock_t wait);
- void main()
- {
- long int i = 0;
- unsigned char A = 0;
- for (i = 0; i < 10; i++)
- {
- A = !A;
- sleep((clock_t)1000); // 1 sekunde wird gewartet
- if (A)
- {
- printf("\r 0");
- }
- else
- {
- printf("\r .");
- }
- }
- }
- void sleep(clock_t wait) // pausiert je nach dem was für eine gewünschte Zeit eingeben wird
- {
- clock_t ziel;
- ziel = wait + clock();
- while (ziel > clock());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement