HP85 GPIB Disk Emulator  1.0
HP85GPIBDiskEmulator
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
delay_tests.c
Go to the documentation of this file.
1 void delay_tests()
6 {
7  printf("System delays\n");
8 
10  clock_elapsed_end("elapsed timer overhead");
11 
13  _delay_us(100);
14  clock_elapsed_end("_delay_us(100)");
15 
17  _delay_us(500);
18  clock_elapsed_end("_delay_us(500)");
19 
20  printf("My delays\n");
21 
23  delayus(100U);
24  clock_elapsed_end("delayus(100)");
25 
27  delayus(500U);
28  clock_elapsed_end("delayus(500)");
29 
31  delayus(1100);
32  clock_elapsed_end("delayus(1100)");
33 
35  delayms(1000);
36  clock_elapsed_end("delayms(1100)");
37 }
printf
MEMSPACE int printf(const char *format,...)
clock_elapsed_begin
MEMSPACE void clock_elapsed_begin()
Store current struct timespec in __clock_elapsed.
Definition: timer.c:184
delayms
void delayms(uint32_t ms)
Delay miliseconds using AVR acr-libc _delay_us() function.
Definition: delay.c:53
delayus
void delayus(uint32_t us)
Delay microseconds using AVR acr-libc _delay_us() function.
Definition: delay.c:26
delay_tests
void delay_tests()
perform tests on delay functions
Definition: delay_tests.c:5
clock_elapsed_end
MEMSPACE void clock_elapsed_end(char *msg)
Subtract and display time difference from clock_elapesed_begin().
Definition: timer.c:200