Annotation of OSKit-Mach/include/sys/time.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Mach Operating System
                      3:  * Copyright (c) 1991 Carnegie Mellon University
                      4:  * All Rights Reserved.
                      5:  *
                      6:  * Permission to use, copy, modify and distribute this software and its
                      7:  * documentation is hereby granted, provided that both the copyright
                      8:  * notice and this permission notice appear in all copies of the
                      9:  * software, derivative works or modified versions, and any portions
                     10:  * thereof, and that both notices appear in supporting documentation.
                     11:  *
                     12:  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
                     13:  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
                     14:  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
                     15:  *
                     16:  * Carnegie Mellon requests users of this software to return to
                     17:  *
                     18:  *  Software Distribution Coordinator  or  [email protected]
                     19:  *  School of Computer Science
                     20:  *  Carnegie Mellon University
                     21:  *  Pittsburgh PA 15213-3890
                     22:  *
                     23:  * any improvements or extensions that they make and grant Carnegie Mellon rights
                     24:  * to redistribute these changes.
                     25:  */
                     26: /*
                     27:  *     Time-keeper for kernel IO devices.
                     28:  *
                     29:  *     May or may not have any relation to wall-clock time.
                     30:  */
                     31: 
                     32: #ifndef _MACH_SA_SYS_TIME_H_
                     33: #define _MACH_SA_SYS_TIME_H_
                     34: 
                     35: #include <mach/time_value.h>
                     36: 
                     37: extern time_value_t    time;
                     38: 
                     39: /*
                     40:  * Definitions to keep old code happy.
                     41:  */
                     42: #define timeval_t time_value_t
                     43: #define timeval time_value
                     44: #define        tv_sec  seconds
                     45: #define        tv_usec microseconds
                     46: 
                     47: #define timerisset(tvp)                ((tvp)->tv_sec || (tvp)->tv_usec)
                     48: #define timercmp(tvp, uvp, cmp)        \
                     49:        ((tvp)->tv_sec cmp (uvp)->tv_sec || \
                     50:         (tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec)
                     51: #define timerclear(tvp)                (tvp)->tv_sec = (tvp)->tv_usec = 0
                     52: 
                     53: #endif /* _MACH_SA_SYS_TIME_H_ */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.