2017c9656f884256b400be40fa25d96d630bf02aRod Evans * CDDL HEADER START
2017c9656f884256b400be40fa25d96d630bf02aRod Evans * The contents of this file are subject to the terms of the
2017c9656f884256b400be40fa25d96d630bf02aRod Evans * Common Development and Distribution License (the "License").
2017c9656f884256b400be40fa25d96d630bf02aRod Evans * You may not use this file except in compliance with the License.
2017c9656f884256b400be40fa25d96d630bf02aRod Evans * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2017c9656f884256b400be40fa25d96d630bf02aRod Evans * See the License for the specific language governing permissions
2017c9656f884256b400be40fa25d96d630bf02aRod Evans * and limitations under the License.
2017c9656f884256b400be40fa25d96d630bf02aRod Evans * When distributing Covered Code, include this CDDL HEADER in each
2017c9656f884256b400be40fa25d96d630bf02aRod Evans * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2017c9656f884256b400be40fa25d96d630bf02aRod Evans * If applicable, add the following below this CDDL HEADER, with the
2017c9656f884256b400be40fa25d96d630bf02aRod Evans * fields enclosed by brackets "[]" replaced with your own identifying
2017c9656f884256b400be40fa25d96d630bf02aRod Evans * information: Portions Copyright [yyyy] [name of copyright owner]
2017c9656f884256b400be40fa25d96d630bf02aRod Evans * CDDL HEADER END
2017c9656f884256b400be40fa25d96d630bf02aRod Evans * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
2017c9656f884256b400be40fa25d96d630bf02aRod Evans * Use is subject to license terms.
2017c9656f884256b400be40fa25d96d630bf02aRod Evans * Translate a struct timeval into a string appropriate for ld(1) and ld.so.1(1)
2017c9656f884256b400be40fa25d96d630bf02aRod Evans * diagnostics.
2017c9656f884256b400be40fa25d96d630bf02aRod Evansconv_time(struct timeval *oldtime, struct timeval *newtime,
2017c9656f884256b400be40fa25d96d630bf02aRod Evans usec = (newtime->tv_usec + MICROSEC) - oldtime->tv_usec;
2017c9656f884256b400be40fa25d96d630bf02aRod Evans * The default display is "sec.fraction", but ld(1) has been know to
2017c9656f884256b400be40fa25d96d630bf02aRod Evans * ascend into minutes, and in worst case scenarios, hours.
2017c9656f884256b400be40fa25d96d630bf02aRod Evans (void) snprintf(time_buf->buf, sizeof (time_buf->buf),
2017c9656f884256b400be40fa25d96d630bf02aRod Evans (void) snprintf(time_buf->buf, sizeof (time_buf->buf),
2017c9656f884256b400be40fa25d96d630bf02aRod Evans (void) snprintf(time_buf->buf, sizeof (time_buf->buf),
2017c9656f884256b400be40fa25d96d630bf02aRod Evans return ((const char *)time_buf);