MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / rt_perf_stop

Function rt_perf_stop

src/utest/perf/perf_tc.c:60–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60void rt_perf_stop(rt_perf_t *perf)
61{
62 perf->real_time = rt_perf_get_timer_us() - perf->begin_time;
63
64 if(perf->local_modify) perf->local_modify(perf);
65 if (perf->real_time > perf->max_time)
66 {
67 perf->max_time = perf->real_time;
68 }
69
70 if (perf->real_time < perf->min_time)
71 {
72 perf->min_time = perf->real_time;
73 }
74
75 perf->count++;
76 perf->tot_time += perf->real_time;
77
78 if(hw_dev)
79 rt_device_control(hw_dev, HWTIMER_CTRL_STOP, NULL);
80}
81
82static rt_int32_t split_double(double num, rt_uint32_t type)
83{

Callers 6

perf_thread_event2Function · 0.85
perf_thread_mbox1Function · 0.85
perf_thread_mq1Function · 0.85
timer_callbackFunction · 0.85
perf_thread_event1Function · 0.85
perf_thread_sem1Function · 0.85

Calls 2

rt_perf_get_timer_usFunction · 0.85
rt_device_controlFunction · 0.85

Tested by

no test coverage detected