Macros used to measure and validate response time in real-time systems.

MacroDefinition
CppTest_Time
CppTest_TimeInit(CPPTEST_INTEGER seconds, CPPTEST_INTEGER nanoseconds);
Initializes the CppTest_Time structure with the given values. Nanoseconds should be between -999999999 and 999999999.
CppTest_Time CppTest_TimeCurrent()Initializes the CppTest_Time structure with the current time. Time is stored as number of seconds (and nanoseconds) since 00:00:00 UTC, January 1, 1970. Accuracy depends on the platform used.
CppTest_Time CppTest_TimeDiff(CppTest_Time t1, CppTest_Time t2)Returns the difference between t1 and t2.
int CppTest_TimeCompare(CppTest_Time t1, CppTest_Time t2)

Compares two CppTest_Time structures. Returns:

           < 0: If t1 is smaller/earlier than t2

           == 0: If t1 and t2 are equal

           > 0: If t1 is bigger/later than t2

  • No labels