Print this page
4776 man: don't lie about ddi_get_time(9f) uses
Reviewed by: Robert Mustacchi <rm@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man9f/ddi_get_time.9f
          +++ new/usr/src/man/man9f/ddi_get_time.9f
   1    1  '\" te
   2    2  .\" Copyright (c) 2000, Sun Microsystems, Inc.
        3 +.\" Copyright (c) 2014, Nexenta Systems, Inc.
   3    4  .\"  All Rights Reserved
   4    5  .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   5    6  .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   6    7  .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   7      -.TH DDI_GET_TIME 9F "Feb 18, 1998"
        8 +.TH DDI_GET_TIME 9F "Apr 15, 2014"
   8    9  .SH NAME
   9   10  ddi_get_time \- returns the current time in seconds
  10   11  .SH SYNOPSIS
  11   12  .LP
  12   13  .nf
  13   14  #include <sys/types.h>
  14   15  #include <sys/ddi.h>
  15   16  #include <sys/sunddi.h>
  16   17  
  17   18  
↓ open down ↓ 2 lines elided ↑ open up ↑
  20   21  .fi
  21   22  
  22   23  .SH INTERFACE LEVEL
  23   24  .sp
  24   25  .LP
  25   26  Solaris DDI specific (Solaris DDI).
  26   27  .SH DESCRIPTION
  27   28  .sp
  28   29  .LP
  29   30  \fBddi_get_time()\fR returns the current time in seconds since 00:00:00 UTC,
  30      -January 1, 1970. This value can be used to set of wait or expiration intervals.
       31 +January 1, 1970. Changes in time of day clock may result in this value
       32 +changing. In other words, the value is not monotonically increasing and
       33 +therefore it must not be used to set wait or expiration intervals. For that,
       34 +instead use \fBddi_get_lbolt\fR(9F) or \fBgethrtime\fR(9F).
  31   35  .SH RETURN VALUES
  32   36  .sp
  33   37  .LP
  34   38  \fBddi_get_time()\fR returns the time in seconds.
  35   39  .SH CONTEXT
  36   40  .sp
  37   41  .LP
  38   42   This routine can be called from any context.
  39   43  .SH SEE ALSO
  40   44  .sp
  41   45  .LP
  42      -\fBddi_get_lbolt\fR(9F), \fBdrv_getparm\fR(9F), \fBdrv_usectohz\fR(9F)
       46 +\fBddi_get_lbolt\fR(9F), \fBdrv_getparm\fR(9F), \fBdrv_usectohz\fR(9F),
       47 +\fBgethrtime\fR(9F)
  43   48  .sp
  44   49  .LP
  45   50  \fIWriting Device Drivers\fR
  46   51  .sp
  47   52  .LP
  48   53   \fISTREAMS Programming Guide\fR
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX