From owner-freebsd-standards@freebsd.org Wed Feb 21 21:33:06 2018 Return-Path: Delivered-To: freebsd-standards@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64663F023C4 for ; Wed, 21 Feb 2018 21:33:06 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf0-x22b.google.com (mail-lf0-x22b.google.com [IPv6:2a00:1450:4010:c07::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BEE9E74603 for ; Wed, 21 Feb 2018 21:33:05 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf0-x22b.google.com with SMTP id y19so4453454lfd.4 for ; Wed, 21 Feb 2018 13:33:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:from:date:message-id:subject:to; bh=3QaHLIEkD8Sa47vFaG2Tf/3TROBbRTZSarpFjqaqOww=; b=egQ3KLjqQd1HlCx+EgBDt+j0259WNXknNfJY2Xdf65eoPWZ7dRxehzMTu0Wdk50oo8 z9rwGddb/TxqB7/F+g2abTXZsUlkPwlqNJ6c7yL/YpaAcxJv59b8BOBTwQoMEYScH4TW bQYZ6kkVXaHCVM50b6xLw00zrSZKvBAgopQOgg7lldxuixRb9srFA7pkf9Z+BBrhwRgO wsdVuW7zIgljdroCxq3W72K/7/6U6XwWTS/PU3H1qS1Z9Nvp7iOW2WxXIGjECRiYAcgb XqphzaO4ycv9efZIxyOHWKY3cI7x/J+E1q8wNEGgKRUZFEyHi5YT/KHJ16cyoAV/rKX0 K2YQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=3QaHLIEkD8Sa47vFaG2Tf/3TROBbRTZSarpFjqaqOww=; b=WCOyCKlsm4moFIhqGGSkimihXoKrSvyWpA0UKv8RRtOpoGeB7nqlteqRPsFKsuJ6vp yo2qgPJPwtZ+86Hx7U0J2IXIwM2lU3VqnzqFxeQIm97hcv2Naazj+k8wUdjs/BEOFIHW oWzJJmGcXhod4Th9QtyU9GnGs+h5eQZkT7dA2xKBZPyUqoDkDMP4IKhs6KbPeUhTRmhQ 6+A8ZCcNZnipb9h1hz+5lLOR5tF5kFBMTK/ACQY5qUbS4LWoQtWODr3V8eKSVxdMlpD2 xJehY82YtIXRhmVwE7ct0rxIdVdMCsZDFbJHDoetOD5xYWANLEmkqQsi0J7FyY7+HsIY XAJQ== X-Gm-Message-State: APf1xPBggSQwuFfv32U36PYt9ofwvLIwp7U/hnW20Had9dO1StMZ0AUN Q/KL5559HpaXrkhOntrCgH2AYd4cQaXH8KnxJmZBCg== X-Google-Smtp-Source: AH8x226x63yNDyKa0yiOOUaJGtHu2fHzxdti677V6ISPW64BE3G1A1TdcNuMocvDPtvfULIr7u2KTAfsrNQLZU79NEE= X-Received: by 10.25.181.147 with SMTP id g19mr3666596lfk.47.1519248783866; Wed, 21 Feb 2018 13:33:03 -0800 (PST) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.179.30.66 with HTTP; Wed, 21 Feb 2018 13:33:03 -0800 (PST) From: Alan Somers Date: Wed, 21 Feb 2018 14:33:03 -0700 X-Google-Sender-Auth: NU-ArU1WPUn5tflQq07hgIRA_4c Message-ID: Subject: Using the monotonic clock in time(1)? To: freebsd-standards@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Feb 2018 21:33:06 -0000 time(1) currently uses the realtime clock, which is undesirable for timing short-lived commands while ntpd is active. I opened a review to add an option to use the monotonic clock instead, but jilles suggested that time should use the monotonic clock unconditionally, since that's almost always better for measuring short durations. However, the Open Group's specification seems to require the real time clock. What do the standards folks think? Is the Open Group spec sufficiently ambiguous and/or wrong that we should switch to the monotonic clock instead? https://reviews.freebsd.org/D14032 http://pubs.opengroup.org/onlinepubs/9699919799/utilities/time.html -alan