2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License, Version 1.0 only 2N/A * (the "License"). You may not use this file except in compliance 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A#
pragma ident "%Z%%M% %I% %E% SMI" 2N/A * This function is blatently stolen from the kernel. 2N/A * See the dissertation in the comments preceding the 2N/A * hrt2ts() function in: 2N/A * Convert absolute time to relative time. 2N/A * All *timedwait() system call traps expect relative time. 2N/A * If the absolute time has already passed, 2N/A * just set the relative time to zero. 2N/A * If the specified absolute time has a bad nanoseconds value, 2N/A * assign it to the relative time value. If the interface 2N/A * attempts to sleep, the bad value will be detected then. 2N/A * The SUSV3 Posix spec is very clear that such detection 2N/A * should not happen until an attempt to sleep is made.