Index: src/benchmark/CorCtxSwitch.c
===================================================================
--- src/benchmark/CorCtxSwitch.c	(revision 29137d3a649bfcc5cdde5a1d7d6e2daeed39a49d)
+++ src/benchmark/CorCtxSwitch.c	(revision 8cb6fcd6c8663c5ae90011e301c2643273bf876d)
@@ -3,23 +3,5 @@
 #include <thread>
 
-#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
+#include "bench.h"
 
 coroutine GreatSuspender {};
@@ -42,8 +24,4 @@
 }
 
-#ifndef N
-#define N 100000000
-#endif
-
 int main() {
 	const unsigned int NoOfTimes = N;
Index: src/benchmark/Monitor.c
===================================================================
--- src/benchmark/Monitor.c	(revision 29137d3a649bfcc5cdde5a1d7d6e2daeed39a49d)
+++ src/benchmark/Monitor.c	(revision 8cb6fcd6c8663c5ae90011e301c2643273bf876d)
@@ -3,27 +3,5 @@
 #include <thread>
 
-#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
+#include "bench.h"
 
 monitor mon_t {};
Index: src/benchmark/SchedInt.c
===================================================================
--- src/benchmark/SchedInt.c	(revision 29137d3a649bfcc5cdde5a1d7d6e2daeed39a49d)
+++ src/benchmark/SchedInt.c	(revision 8cb6fcd6c8663c5ae90011e301c2643273bf876d)
@@ -3,27 +3,5 @@
 #include <thread>
 
-#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
+#include "bench.h"
 
 condition condA; 
Index: src/benchmark/ThrdCtxSwitch.c
===================================================================
--- src/benchmark/ThrdCtxSwitch.c	(revision 29137d3a649bfcc5cdde5a1d7d6e2daeed39a49d)
+++ src/benchmark/ThrdCtxSwitch.c	(revision 8cb6fcd6c8663c5ae90011e301c2643273bf876d)
@@ -3,27 +3,5 @@
 #include <thread>
 
-#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 100000000
-#endif
+#include "bench.h"
 
 int main() {
Index: src/benchmark/bench.c
===================================================================
--- src/benchmark/bench.c	(revision 29137d3a649bfcc5cdde5a1d7d6e2daeed39a49d)
+++ src/benchmark/bench.c	(revision 8cb6fcd6c8663c5ae90011e301c2643273bf876d)
@@ -4,23 +4,5 @@
 #include <thread>
 
-#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
+#include "bench.h"
 
 //=======================================
Index: src/benchmark/bench.h
===================================================================
--- src/benchmark/bench.h	(revision 8cb6fcd6c8663c5ae90011e301c2643273bf876d)
+++ src/benchmark/bench.h	(revision 8cb6fcd6c8663c5ae90011e301c2643273bf876d)
@@ -0,0 +1,27 @@
+#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
Index: src/benchmark/csv-data.c
===================================================================
--- src/benchmark/csv-data.c	(revision 29137d3a649bfcc5cdde5a1d7d6e2daeed39a49d)
+++ src/benchmark/csv-data.c	(revision 8cb6fcd6c8663c5ae90011e301c2643273bf876d)
@@ -3,25 +3,5 @@
 #include <thread>
 
-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
+#include "bench.h"
 
 coroutine GreatSuspender {};
