Changeset e543a16 in rtems
- Timestamp:
- 11/26/21 06:29:52 (14 months ago)
- Branches:
- master
- Children:
- 39e6f532
- Parents:
- 5e3607bc
- git-author:
- Sebastian Huber <sebastian.huber@…> (11/26/21 06:29:52)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (12/07/21 11:53:40)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/libtest/t-test-rtems-measure.c
r5e3607bc re543a16 379 379 sample_count = ctx->sample_count; 380 380 samples = ctx->samples; 381 last = 0;382 --last;383 count = 0;384 385 for (i = 0; i < sample_count; ++i) {381 last = samples[0]; 382 v = samples[0]; 383 count = 1; 384 385 for (i = 1; i < sample_count; ++i) { 386 386 v = samples[i]; 387 ++count;388 387 389 388 if (v != last) { … … 394 393 T_time t; 395 394 396 T_time_to_seconds_and_nanoseconds(T_ticks_to_time(last),397 398 t = T_ticks_to_time(v);399 T_time_to_seconds_and_nanoseconds(t,&sb, &nsb);395 t = T_ticks_to_time(last); 396 T_time_to_seconds_and_nanoseconds(t, &sa, &nsa); 397 T_time_to_seconds_and_nanoseconds(T_ticks_to_time(v), 398 &sb, &nsb); 400 399 401 400 if (sa != sb || nsa != nsb) { 402 401 T_printf("M:S:%zu:%s\n", count, 403 402 T_time_to_string_ns(t, ts)); 404 count = 0; 403 count = 1; 404 } else { 405 ++count; 405 406 } 406 407 407 408 last = v; 409 } else { 410 ++count; 408 411 } 409 412 } … … 411 414 if (count > 0) { 412 415 T_printf("M:S:%zu:%s\n", count, 413 T_ticks_to_string_ns( last, ts));416 T_ticks_to_string_ns(v, ts)); 414 417 } 415 418 }
Note: See TracChangeset
for help on using the changeset viewer.