public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "adhemerval.zanella at linaro dot org" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sourceware.org Subject: [Bug time/30200] time sometimes appears to go backwards Date: Mon, 06 Mar 2023 13:08:58 +0000 [thread overview] Message-ID: <bug-30200-131-vajkl4KYH7@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-30200-131@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=30200 --- Comment #9 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> --- (In reply to Florian Weimer from comment #7) > (In reply to Adhemerval Zanella from comment #6) > > I agree that it makes sense to use the same clock for time and timespec_get, > > however, using CLOCK_REALTIME would make the vDSO optimization for x86_64 > > and powerpc64 unusable (not a big deal IMHO). And another question is > > whether we will need to add a compact symbol to time (and I also do not > > think it would make sense either). > > CLOCK_REALTIME still has vDSO acceleration in many cases on x86-64, right? > It's just a bit slower, and the difference can matter to some logging > frameworks if I recall correctly. Yes, it will follow the usual route of calling __clock_gettime, which in turn will call the vDSO. > There are three ways to get the clock with 1-second resolution using simple ISO C / POSIX APIs: > - time(NULL) > - gettimeofday().tv_sec > - timespec_get(TIME_UTC).tv_sec > If using one of these then another one of these produces backwards progression, how are the applications supposed to behave in a sane way? > > In other words, this bug report is not so much about standards compliance, but > about doing something that is practically sensible. I tend to agree, I see no reason but performance implications to have different clocks for similar interfaces. -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2023-03-06 13:08 UTC|newest] Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-03-05 17:21 [Bug time/30200] New: " bruno at clisp dot org 2023-03-05 17:22 ` [Bug time/30200] " bruno at clisp dot org 2023-03-05 17:23 ` bruno at clisp dot org 2023-03-05 17:55 ` girish946 at gmail dot com 2023-03-05 18:28 ` schwab@linux-m68k.org 2023-03-05 18:58 ` schwab@linux-m68k.org 2023-03-05 19:04 ` bruno at clisp dot org 2023-03-06 12:15 ` adhemerval.zanella at linaro dot org 2023-03-06 12:25 ` fweimer at redhat dot com 2023-03-06 12:45 ` bruno at clisp dot org 2023-03-06 13:08 ` adhemerval.zanella at linaro dot org [this message] 2023-03-06 13:14 ` fweimer at redhat dot com 2023-03-19 23:43 ` eggert at cs dot ucla.edu 2023-03-21 4:18 ` sam at gentoo dot org 2023-03-21 15:06 ` adhemerval.zanella at linaro dot org 2023-03-21 15:29 ` bruno at clisp dot org 2023-03-21 16:02 ` adhemerval.zanella at linaro dot org 2023-03-21 20:00 ` bruno at clisp dot org 2023-03-21 20:03 ` adhemerval.zanella at linaro dot org 2023-03-21 20:25 ` fw at deneb dot enyo.de 2023-03-21 20:41 ` adhemerval.zanella at linaro dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-30200-131-vajkl4KYH7@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).