hwclock: add parameters for minimum/maximum number of samples

Allocate the arrays which hold the samples dynamically and limit the
number of dropped samples to not fall below the minimum.
This commit is contained in:
Miroslav Lichvar
2018-08-08 13:22:30 +02:00
parent 159bd73f76
commit c0717a27f6
5 changed files with 33 additions and 17 deletions

View File

@@ -31,7 +31,7 @@ test_unit(void)
LCL_Initialise();
clock = HCL_CreateInstance(1.0);
clock = HCL_CreateInstance(0, 16, 1.0);
for (i = 0, count = 0, sum = 0.0; i < 2000; i++) {
UTI_ZeroTimespec(&start_hw_ts);