mirror of
https://github.com/lh3/minimap2.git
synced 2026-10-02 18:18:12 +08:00
index can be compiled; not tested yet
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
#include <sys/resource.h>
|
||||
#include <sys/time.h>
|
||||
#include "minimap.h"
|
||||
|
||||
int mm_verbose = 3;
|
||||
double mm_realtime0;
|
||||
|
||||
double cputime()
|
||||
{
|
||||
struct rusage r;
|
||||
getrusage(RUSAGE_SELF, &r);
|
||||
return r.ru_utime.tv_sec + r.ru_stime.tv_sec + 1e-6 * (r.ru_utime.tv_usec + r.ru_stime.tv_usec);
|
||||
}
|
||||
|
||||
double realtime()
|
||||
{
|
||||
struct timeval tp;
|
||||
struct timezone tzp;
|
||||
gettimeofday(&tp, &tzp);
|
||||
return tp.tv_sec + tp.tv_usec * 1e-6;
|
||||
}
|
||||
|
||||
#include "ksort.h"
|
||||
#define sort_key_128x(a) ((a).x)
|
||||
KRADIX_SORT_INIT(128x, mm128_t, sort_key_128x, 8)
|
||||
KSORT_INIT_GENERIC(uint32_t)
|
||||
Reference in New Issue
Block a user