#pragma once

extern "C" {
	#include <unistd.h>					// sysconf
	#include <sys/times.h>					// times
	#include <time.h>
}

inline unsigned long long int Time() {
    timespec ts;
    clock_gettime(
#if defined( __linux__ )
	 CLOCK_THREAD_CPUTIME_ID,
#elif defined( __freebsd__ )
	 CLOCK_PROF,
#elif defined( __solaris__ )
	 CLOCK_HIGHRES,
#else
    #error uC++ : internal error, unsupported architecture
#endif
	 &ts );
    return 1000000000LL * ts.tv_sec + ts.tv_nsec;
} // Time

#ifndef N
#define N 10000000
#endif

unsigned int default_preemption() {
	return 0;
}