On Thu, Apr 29, 2021, 8:16 AM yuta <yutr...@gmail.com> wrote: > Hi all. > > I'm new to NuttX. > > I'm not sure if it's no problem me asking some personal question about > NuttX here. (please tell me if better place to ask.) > > by the way, I have made my app in apps/examples/<my app>. It's working > well. Now, I would like to measure elapsed time during processing a > program by put codes like below. >
NuttX supports the POSIX time interfaces so you are looking for something like this. https://www.gnu.org/software/libc/manual/html_node/Calculating-Elapsed-Time.html There is also CPU time measurements, but NuttX does not treat this exactly correct as it is expected to give the amount of clock ticks the CPU has spent on a process. Instead with NuttX you get ticks since boot. https://www.gnu.org/software/libc/manual/html_node/Processor-And-CPU-Time.html --Brennan