-2

So I'm doing a quality assurance task with raspberry pi under linux, the 7 programs are preload, preload.c,run_test, run_test.c, runit_mainain,runit_preload,runit_test.

What I do is running runit_preload,and then run run_test, and then unplug the raspberry and at last run runit_maintain. I need to record the time of the execution time of each program but every time I try time -p runit_preload or time -p ./preload.c,it never shows the time but instead runs the program again.

user3358850
  • 129
  • 9

1 Answers1

1

If you have already used time API in C (make a search about gettime function in C ) it's will be easy and more accurate. You get time value at the beginning and the end of your main function and run your program. Repeat this process many times to get the worst runtime.

madago
  • 129
  • 1
  • 13