pulled in and adapted the dos code from eradicate
[retrobench] / src / util.c
1 #include "util.h"
2
3 uint32_t perf_start_count, perf_interval_count;
4
5 int mask_to_shift(unsigned int mask)
6 {
7         int s = 0;
8         if(mask) {
9                 while(!(mask & 1)) {
10                         mask >>= 1;
11                         s++;
12                 }
13         }
14         return s;
15 }