timeradd man page on FreeBSD

Man page or keyword search:  
man Server   9747 pages
apropos Keyword Search (all sections)
Output format
FreeBSD logo
[printable version]

TIMERADD(3)		 BSD Library Functions Manual		   TIMERADD(3)

NAME
     timeradd, timersub, timerclear, timerisset, timercmp — operations on
     timevals

SYNOPSIS
     #include <sys/time.h>

     void
     timeradd(struct timeval *a, struct timeval *b, struct timeval *res);

     void
     timersub(struct timeval *a, struct timeval *b, struct timeval *res);

     void
     timerclear(struct timeval *tvp);

     int
     timerisset(struct timeval *tvp);

     int
     timercmp(struct timeval *a, struct timeval *b, CMP);

DESCRIPTION
     These macros are provided for manipulating timeval structures for use
     with the gettimeofday(2) and settimeofday(2) calls.  The structure is
     defined in <sys/time.h> as:

     struct timeval {
	     long    tv_sec;	     /* seconds since Jan. 1, 1970 */
	     long    tv_usec;	     /* and microseconds */
     };

     timeradd() adds the time information stored in a to b and stores the
     resulting timeval in res.	The results are simplified such that the value
     of res->tv_usec is always less than 1,000,000 (1 second).

     timersub() subtracts the time information stored in b from a and stores
     the resulting timeval in res.

     timerclear() initializes tvp to midnight (0 hour) January 1st, 1970 (the
     Epoch).

     timerisset() returns true if tvp is set to any time value other than the
     Epoch.

     timercmp() compares a to b using the comparison operator given in CMP,
     and returns the result of that comparison.

SEE ALSO
     gettimeofday(2)

HISTORY
     The timeradd() family of macros were imported from NetBSD 1.1, and
     appeared in FreeBSD 2.2.6.

BSD				August 11, 1999				   BSD
[top]

List of man pages available for FreeBSD

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
...................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net