diff options
Diffstat (limited to 'heap.c')
| -rw-r--r-- | heap.c | 4 |
1 files changed, 3 insertions, 1 deletions
| @@ -191,7 +191,9 @@ test_heapsort(void) | |||
| 191 | } | 191 | } |
| 192 | 192 | ||
| 193 | puts("sortiere...."); | 193 | puts("sortiere...."); |
| 194 | clock_t start = clock(); | ||
| 194 | my_heapsort(array, NELEM(array)); | 195 | my_heapsort(array, NELEM(array)); |
| 196 | clock_t end = clock(); | ||
| 195 | 197 | ||
| 196 | puts("teste..."); | 198 | puts("teste..."); |
| 197 | for ( size_t idx = 1; idx != NELEM(array); ++idx ) { | 199 | for ( size_t idx = 1; idx != NELEM(array); ++idx ) { |
| @@ -207,7 +209,7 @@ test_heapsort(void) | |||
| 207 | } | 209 | } |
| 208 | #endif | 210 | #endif |
| 209 | } | 211 | } |
| 210 | puts("ok"); | 212 | printf("ok! (%.3lf sec)\n", ((double) end - start) / CLOCKS_PER_SEC); |
| 211 | } | 213 | } |
| 212 | 214 | ||
| 213 | void | 215 | void |
