diff --git a/dse/modelc/examples/benchmark/benchmark_model.c b/dse/modelc/examples/benchmark/benchmark_model.c index 01e9ff4..fe87ad2 100644 --- a/dse/modelc/examples/benchmark/benchmark_model.c +++ b/dse/modelc/examples/benchmark/benchmark_model.c @@ -2,10 +2,10 @@ // // SPDX-License-Identifier: Apache-2.0 -#include #include -#include +#include #include +#include #include #include @@ -27,10 +27,10 @@ static size_t signal_count; int generate_random_num(int lower, int upper) { - static unsigned int seed = 0; - if (seed == 0) seed = time(0); lower = upper/2 - 1; - int num = (rand_r(&seed) % (upper - lower )) + lower; + srand(time(0)); + int num = (rand() % (upper - lower )) + lower; // NOLINT + // Alternative rand_r() not available in mingw. return num; } diff --git a/tests/pytest/benchmark/Makefile b/tests/pytest/benchmark/Makefile index 15a1132..d12e54f 100644 --- a/tests/pytest/benchmark/Makefile +++ b/tests/pytest/benchmark/Makefile @@ -33,3 +33,4 @@ benchmark: .PHONY: clean clean: rm -rf _out + rm -rf _working