Skip to Main Content Skip to Search
Product Documentation

xpcSubtractTime - Return difference between two times

Prototype

real_T xpcSubtractTime(xpcTime *time, 
const xpcTime *time2, const xpcTime *time1)

Arguments

time

Pointer to an xpcTime structure.

time2

Enter the time to subtract.

time1

Enter the time to subtract from.

Description

xpcSubtractTime returns the difference between time1 and time2 (time2 - time1), in seconds. You can get this time in nanoseconds by passing a pointer to a previously allocated xpcTime structure. You can pass a NULL pointer for the time argument if you do not want the time in nanoseconds.

See Also

xpcTime, xpcGetElapsedTime

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS