Deleted Added
full compact
time.h (225736) time.h (248369)
1/*-
2 * Copyright (c) 2007 Pawel Jakub Dawidek <pjd@FreeBSD.org>
3 * 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

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 2007 Pawel Jakub Dawidek <pjd@FreeBSD.org>
3 * 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

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: stable/9/sys/cddl/compat/opensolaris/sys/time.h 222670 2011-06-04 07:02:06Z avg $
26 * $FreeBSD: stable/9/sys/cddl/compat/opensolaris/sys/time.h 248369 2013-03-16 08:16:11Z mm $
27 */
28
29#ifndef _OPENSOLARIS_SYS_TIME_H_
30#define _OPENSOLARIS_SYS_TIME_H_
31
32#include_next <sys/time.h>
33
34#define SEC 1

--- 6 unchanged lines hidden (view full) ---

41#if defined(__i386__) || defined(__powerpc__)
42#define TIMESPEC_OVERFLOW(ts) \
43 ((ts)->tv_sec < INT32_MIN || (ts)->tv_sec > INT32_MAX)
44#else
45#define TIMESPEC_OVERFLOW(ts) \
46 ((ts)->tv_sec < INT64_MIN || (ts)->tv_sec > INT64_MAX)
47#endif
48
27 */
28
29#ifndef _OPENSOLARIS_SYS_TIME_H_
30#define _OPENSOLARIS_SYS_TIME_H_
31
32#include_next <sys/time.h>
33
34#define SEC 1

--- 6 unchanged lines hidden (view full) ---

41#if defined(__i386__) || defined(__powerpc__)
42#define TIMESPEC_OVERFLOW(ts) \
43 ((ts)->tv_sec < INT32_MIN || (ts)->tv_sec > INT32_MAX)
44#else
45#define TIMESPEC_OVERFLOW(ts) \
46 ((ts)->tv_sec < INT64_MIN || (ts)->tv_sec > INT64_MAX)
47#endif
48
49#define SEC_TO_TICK(sec) ((sec) * hz)
50#define NSEC_TO_TICK(usec) ((usec) / (NANOSEC / hz))
51
49#ifdef _KERNEL
50static __inline hrtime_t
51gethrtime(void) {
52
53 struct timespec ts;
54 hrtime_t nsec;
55
56 getnanouptime(&ts);

--- 35 unchanged lines hidden ---
52#ifdef _KERNEL
53static __inline hrtime_t
54gethrtime(void) {
55
56 struct timespec ts;
57 hrtime_t nsec;
58
59 getnanouptime(&ts);

--- 35 unchanged lines hidden ---