| 31 | } |
| 32 | |
| 33 | void timer(const char *text = NULL) |
| 34 | { |
| 35 | static timer_type t; |
| 36 | if (text) |
| 37 | { |
| 38 | float ms = timer_elapsed(t); |
| 39 | printf("%s %g micro seconds\n", text, 1000*ms/RUNS); |
| 40 | } |
| 41 | else |
| 42 | { |
| 43 | timer_start(t); |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | // http://www.lipsum.com |
| 48 |