From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 389E61F461 for ; Wed, 28 Aug 2019 20:01:53 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:cc:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=mXiK4pLc5FlkDuzN /4yH2blVOjtBhJuqgNyC1oyZmZmOGcmf6nBA0C/61+1KD5L/dmDyoC2Dkd9U8yJa JWxtVIOThzf7zvdWG10mBwubyaZDlbQ9vvDzihYplnI6e60sNw4OSJeaYeCarB9A Jgw9DL81sOLORt4PDw0IwJP43ms= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:cc:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=Rafje29D+icNCZUjm1Ic8t 9YS0A=; b=P7xjz4bXxU1wUR1Owr25WK2jNq9ShQoYxG2OWdWbsm9ZJPM17c14Du /WuuYEY7VF7rBoOqzG7j0EM4OcTlF8Rkc/9TR6ynrVjnjwjTHQ55qkV666dLzKH8 6pT+2ZO2mR5cFvDJXvNh9/7k8BDkO7umR9K2VxD6feisG+N+x1xrA= Received: (qmail 69942 invoked by alias); 28 Aug 2019 20:01:50 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 69932 invoked by uid 89); 28 Aug 2019 20:01:50 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: zimbra.cs.ucla.edu Subject: Re: [PATCH v2 05/10] Use clock_gettime to implement time. To: Florian Weimer , Zack Weinberg Cc: libc-alpha@sourceware.org, Joseph Myers , Lukasz Majewski , Alistair Francis , Stepan Golosunov , Arnd Bergmann , Adhemerval Zanella , Samuel Thibault References: <20190828153236.18229-1-zackw@panix.com> <20190828153236.18229-6-zackw@panix.com> <87muftb1fk.fsf@oldenburg2.str.redhat.com> From: Paul Eggert Message-ID: Date: Wed, 28 Aug 2019 13:01:45 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <87muftb1fk.fsf@oldenburg2.str.redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Florian Weimer wrote: > Given that time has no stringent accuracy requirements, this shouldn't > come as a surprise. In what sense does 'time' have less-stringent accuracy requirements than clock_gettime (CLOCK_REALTIME) does? Can 'time' return a value that disagrees with the time_t part of what clock_gettime (CLOCK_REALTIME) returns? Any such disagreement would cause application bugs that could well be unlikely and hard to track down; also, if there is disagreement, replacing calls to 'time' with calls to clock_gettime might not be advisable even aside from performance issues.