Changeset 7222a65 in rtems
- Timestamp:
- 06/21/16 07:45:39 (7 years ago)
- Branches:
- 5, master
- Children:
- 4c927c79
- Parents:
- fa239ff2
- git-author:
- Sebastian Huber <sebastian.huber@…> (06/21/16 07:45:39)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (06/21/16 13:54:18)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
testsuites/sptests/spcpucounter01/init.c
rfa239ff2 r7222a65 159 159 } 160 160 161 static uint64_t large_delta_to_ns(rtems_counter_ticks d) 162 { 163 uint64_t ns; 164 165 ns = rtems_counter_ticks_to_nanoseconds(d); 166 167 /* Special case for CPU counters using the clock driver counter */ 168 if (ns < rtems_configuration_get_nanoseconds_per_tick()) { 169 printf( 170 "warning: the RTEMS counter seems to be unable to\n" 171 " measure intervals greater than the clock tick interval\n" 172 ); 173 174 ns += rtems_configuration_get_nanoseconds_per_tick(); 175 } 176 177 return ns; 178 } 179 161 180 static void test_report(test_context *ctx) 162 181 { … … 170 189 for (i = 0; i < N; ++i) { 171 190 d = rtems_counter_difference(ctx->delay_ns_t[i][1], ctx->delay_ns_t[i][0]); 172 ns = rtems_counter_ticks_to_nanoseconds(d);191 ns = large_delta_to_ns(d); 173 192 174 193 printf( … … 187 206 ctx->delay_ticks_t[i][0] 188 207 ); 189 ns = rtems_counter_ticks_to_nanoseconds(d);208 ns = large_delta_to_ns(d); 190 209 191 210 printf(
Note: See TracChangeset
for help on using the changeset viewer.