timespeccmp(3c) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

timespeccmp(3c)

Standard C Library Functions                                   timespeccmp(3C)



NAME
       timespeccmp,  timespeccompare,  timespecadd,  timespecsub, timespecfix,
       timespecclear, timespecisset - timespec utility functions. Used to add,
       subtract, normalize, clear, check if
                   set, and compare two timespec structures.

SYNOPSIS
       #include <sys/timespec_util.h>


       int timespeccmp(struct timespec *t1, struct timespec *t2, CMP)


       int timespeccompare(struct timespec *t1, struct timespec *t2);


       void timespecadd(struct timespec *t1, struct timespec *t2, struct timespec *res);


       void timespecsub(struct timespec *t1, struct timespec *t2, struct timespec *res);


       void timespecfix(struct timespec *t1);


       void timespecclear(struct timespec *t1);


       int timespecisset(struct timespec *t1);

DESCRIPTION
       The timespeccmp() macro compares t1 to t2 using the comparison operator
       given in CMP, where CMP is one of <, <=, ==, !=, >=, or >.  The  result
       of the comparison is returned.


       The  timespeccompare()  function  compares  two timespec structures. It
       returns an integer greater than, equal to, or less than  0,  if  t1  is
       greater than, equal to, or less than t2 respectively.


       The  timespecadd() function adds t2 to t1. The resulting timespec value
       is normalized and stored in res.


       The timespecsub() function subtracts t2 from t1. The resulting timespec
       value is normalized and stored in res.


       The  timespecfix()  function,  given a timespec  t1, adjusts the second
       and nanosecond values such that the nanoseconds are  between  0  and  1
       billion,  inclusive  of  0  and  exclusive  of 1 billion. Any left over
       nanoseconds are converted to seconds and added to the value in seconds.


       The timespecclear() function initializes the given  timespec  structure
       to zero.


       The  timespecisset() function returns true if the input timespec struc‐
       ture is set to any non-zero time value.

ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE  TYPEAT‐
       TRIBUTE  VALUE _ ArchitectureSPARC and x86 _ Interface StabilityCommit‐
       ted _ MT-LevelMT-Safe


SEE ALSO
       timercmp(3C), timeradd(3C)



Oracle Solaris 11.4               08 Nov 2016                  timespeccmp(3C)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3