From: Laurent MAZET Date: Mon, 3 Nov 2025 18:20:31 +0000 (+0100) Subject: avoid test other then thread mode X-Git-Tag: v1.1~9 X-Git-Url: https://secure.softndesign.org/git/?a=commitdiff_plain;h=af9c7ecfd8361608ca96056a058cf8404a7d8405;p=benchmarks.git avoid test other then thread mode --- diff --git a/clock.c b/clock.c index 5a05ef5..fda66bc 100644 --- a/clock.c +++ b/clock.c @@ -26,12 +26,21 @@ int (*parse_arg_ext) (char *) = NULL; int init (dts_t *buffer, int nb, int mode) { + if (mode != 0) { + fprintf (stderr, "only avaible in thread mode\n"); + return 1; + } + /* set global variables */ deltas = buffer; nb_measurements = nb; current_mode = mode; + /* get clock resolution */ + + printf ("Clock resolution: %dns\n", res_timestamp ()); + return 0; } diff --git a/cycle.c b/cycle.c index 77976d4..a86b80c 100644 --- a/cycle.c +++ b/cycle.c @@ -26,6 +26,11 @@ int (*parse_arg_ext) (char *) = NULL; int init (dts_t *buffer, int nb, int mode) { + if (mode != 0) { + fprintf (stderr, "only avaible in thread mode\n"); + return 1; + } + /* set global variables */ deltas = buffer;