Skip navigation
SEGGER - RTOS embOS Product Icon

embOS µsec Precise System Time

Use highly accurate timings with embOS.

embOS supports run-time measurements that may be used for calculating the execution time of any section of user code.

embOS offers the API function OS_TIME_Getus() to retrieve the current system time in micro second resolution. This feature is easy to use and can be utilized with any embOS start project. An application merely needs to set up this feature with a simple API call to OS_TIME_ConfigSysTimer(). This was already done for most embOS start projects, and may swiftly be done for any further embOS start project on request.

void MyFunction(void) {
  OS_U32 tStart;
  OS_U32 tEnd;
  OS_U32 t;

  tStart = OS_TIME_Getus();
  tEnd = OS_TIME_Getus();
  t = tEnd - tStart;
  printf("Time to run the function: %u", t);