diff options
author | Chris Johns <chrisj@rtems.org> | 2013-12-24 16:42:23 +1100 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2013-12-24 16:46:19 +1100 |
commit | 9f9c0bbf47999120aab4e12d1ec22b28b7cf947d (patch) | |
tree | 20a47b6af579f6d7e995cf45e87b9e6ae8729254 /cpukit/libmisc/capture/capture.c | |
parent | cpukit/rtems: Add rtems_clock_get_uptime_nanoseconds to the RTEMS API. (diff) | |
download | rtems-9f9c0bbf47999120aab4e12d1ec22b28b7cf947d.tar.bz2 |
cpukit/capture: Use the new RTEMS API to get the uptime in nanoseconds.
Use the new API to get the uptime in nanoseconds and update the capture
engine.
Diffstat (limited to 'cpukit/libmisc/capture/capture.c')
-rw-r--r-- | cpukit/libmisc/capture/capture.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cpukit/libmisc/capture/capture.c b/cpukit/libmisc/capture/capture.c index 3f81a1d20d..6bdec50c69 100644 --- a/cpukit/libmisc/capture/capture.c +++ b/cpukit/libmisc/capture/capture.c @@ -121,7 +121,7 @@ rtems_capture_get_time (rtems_capture_time_t* time) capture_timestamp (time); else { - _TOD_Get_uptime(time); + *time = rtems_clock_get_uptime_nanoseconds (); } } @@ -953,7 +953,8 @@ rtems_capture_switch_task (rtems_tcb* current_task, if (ct) { ct->out++; - ct->time += time - ct->time_in; + if (ct->time_in) + ct->time += time - ct->time_in; } if (rtems_capture_trigger (ct, ht, RTEMS_CAPTURE_SWITCH)) |