time.h (247452) | time.h (247476) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)time.h 8.5 (Berkeley) 5/4/95 | 1/*- 2 * Copyright (c) 1982, 1986, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)time.h 8.5 (Berkeley) 5/4/95 |
30 * $FreeBSD: head/sys/sys/time.h 247452 2013-02-28 10:21:04Z mav $ | 30 * $FreeBSD: head/sys/sys/time.h 247476 2013-02-28 17:10:30Z davide $ |
31 */ 32 33#ifndef _SYS_TIME_H_ 34#define _SYS_TIME_H_ 35 36#include <sys/_timeval.h> 37#include <sys/types.h> 38#include <sys/timespec.h> --- 65 unchanged lines hidden (view full) --- 104 105#define bintime_clear(a) ((a)->sec = (a)->frac = 0) 106#define bintime_isset(a) ((a)->sec || (a)->frac) 107#define bintime_cmp(a, b, cmp) \ 108 (((a)->sec == (b)->sec) ? \ 109 ((a)->frac cmp (b)->frac) : \ 110 ((a)->sec cmp (b)->sec)) 111 | 31 */ 32 33#ifndef _SYS_TIME_H_ 34#define _SYS_TIME_H_ 35 36#include <sys/_timeval.h> 37#include <sys/types.h> 38#include <sys/timespec.h> --- 65 unchanged lines hidden (view full) --- 104 105#define bintime_clear(a) ((a)->sec = (a)->frac = 0) 106#define bintime_isset(a) ((a)->sec || (a)->frac) 107#define bintime_cmp(a, b, cmp) \ 108 (((a)->sec == (b)->sec) ? \ 109 ((a)->frac cmp (b)->frac) : \ 110 ((a)->sec cmp (b)->sec)) 111 |
112typedef int64_t sbintime_t; | |
113#define SBT_1S ((sbintime_t)1 << 32) 114#define SBT_1M (SBT_1S * 60) 115#define SBT_1MS (SBT_1S / 1000) 116#define SBT_1US (SBT_1S / 1000000) 117#define SBT_1NS (SBT_1S / 1000000000) 118 119static __inline int 120sbintime_getsec(sbintime_t sbt) --- 333 unchanged lines hidden --- | 112#define SBT_1S ((sbintime_t)1 << 32) 113#define SBT_1M (SBT_1S * 60) 114#define SBT_1MS (SBT_1S / 1000) 115#define SBT_1US (SBT_1S / 1000000) 116#define SBT_1NS (SBT_1S / 1000000000) 117 118static __inline int 119sbintime_getsec(sbintime_t sbt) --- 333 unchanged lines hidden --- |