Print this page
11546 Track TCP round-trip time in nanoseconds
Portions contributed by: Cody Peter Mello <cody.mello@joyent.com>
Portions contributed by: Brandon Baker <bbaker@delphix.com>
Reviewed by: Jason King <jason.king@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Dan McDonald <danmcd@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/time.h
          +++ new/usr/src/uts/common/sys/time.h
↓ open down ↓ 10 lines elided ↑ open up ↑
  11   11  /*
  12   12   * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  13   13   *
  14   14   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  15   15   * Use is subject to license terms.
  16   16   *
  17   17   * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
  18   18   */
  19   19  
  20   20  /*
  21      - * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
       21 + * Copyright (c) 2013, 2016 by Delphix. All rights reserved.
  22   22   */
  23   23  
  24   24  #ifndef _SYS_TIME_H
  25   25  #define _SYS_TIME_H
  26   26  
  27   27  #include <sys/feature_tests.h>
  28   28  
  29   29  /*
  30   30   * Structure returned by gettimeofday(2) system call,
  31   31   * and used in other calls.
↓ open down ↓ 208 lines elided ↑ open up ↑
 240  240   *      Definitions for commonly used resolutions.
 241  241   */
 242  242  #define SEC             1
 243  243  #define MILLISEC        1000
 244  244  #define MICROSEC        1000000
 245  245  #define NANOSEC         1000000000LL
 246  246  
 247  247  #define MSEC2NSEC(m)    ((hrtime_t)(m) * (NANOSEC / MILLISEC))
 248  248  #define NSEC2MSEC(n)    ((n) / (NANOSEC / MILLISEC))
 249  249  
 250      -#define USEC2NSEC(m)    ((hrtime_t)(m) * (NANOSEC / MICROSEC))
 251      -#define NSEC2USEC(n)    ((n) / (NANOSEC / MICROSEC))
      250 +#define USEC2NSEC(m)    ((hrtime_t)(m) * (NANOSEC / MICROSEC))
      251 +#define NSEC2USEC(n)    ((n) / (NANOSEC / MICROSEC))
 252  252  
 253  253  #define NSEC2SEC(n)     ((n) / (NANOSEC / SEC))
 254  254  #define SEC2NSEC(m)     ((hrtime_t)(m) * (NANOSEC / SEC))
 255  255  
 256  256  #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
 257  257  
 258  258  #ifndef _ASM
 259  259  
 260  260  /*
 261  261   * Time expressed as a 64-bit nanosecond counter.
↓ open down ↓ 223 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX