ntimersub Macro

Purpose

Computes the difference between two nanotimers.

Syntax

#include<sys/time.h>
ntimersub(tvp, svp, rvp) 
struct timestruc_t tvp, svp, rvp;
Note: The ntimersub macro asserts for invalid values of parameters. The following header files need to be included for definition of assert:
<assert.h>
For user applications.
<sys/syspest.h>
For kernel extensions.

Description

The ntimersub macro is used to compute the difference between nanotimers. Call to the ntimersub(tvp, svp, rvp) macro subtracts the nanotimer value that is stored in the svp variable from the value that is stored in the tvp variable and stores the result in the rvp variable.

Parameters

The tvp , svp, and rvp variables are of type struct timestruc_t structure, that is defined in the sys/time.h header file.