Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Get total runtime without getting task info

Posted by fazjaxton on January 13, 2017

I would like to retrieve the total system runtime without needing to allocate memory for a TaskStatus_t for every task in my system. However, the current implementation of uxTaskGetSystemState has the code to set the total runtime inside the check for uxArraySize, so that if you don't provide the array, you also don't get the runtime. For a future release, could the runtime be set outside of this check, so that I could do uxTaskGetSystemState (NULL, 0, &runtime) and get just the runtime? Or perhaps another accessor function could be added to get this value.

Thank you!

Get total runtime without getting task info

Posted by rtel on January 13, 2017

The counter obtained using the method is a high speed clock provided by the user. If you just want the run time without apportioning the total time to individual tasks you could just read the tick count value. If you system runs for a very long time you would also have to counter overflows.

[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]

Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

Meet us at Embedded World. Hall 3A-525.

Hear from Richard Barry at Embedded World. Feb 28, 16:00, Hall 4-428.

Video: Watch James Gosling & Richard Barry at re:Invent, Las Vegas 2017.

FreeRTOS kernel V10.0.1 is available for immediate download. Now MIT licensed.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS