From: "Matthias Weißer" <m.weisser.m@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] sandbox: Add timer simulation
Date: Tue, 29 Nov 2011 10:35:06 +0100 [thread overview]
Message-ID: <4ED4A74A.1000501@googlemail.com> (raw)
In-Reply-To: <201111281757.22701.vapier@gentoo.org>
Am 28.11.2011 23:57, schrieb Mike Frysinger:
> On Monday 28 November 2011 16:40:29 Matthias Weisser wrote:
>> Making sleep command work
>
> i like the idea, but using clock_xxx funcs makes me sad (generally requires a
> "newerish" glibc and -lrt). my only alternative proposal is to use usec's
> with gettimeofday ... maybe that's good enough ? although we'll probably need
> to add nsec support eventually anyways for the newer timer code ...
I would like to stay with clock_gettime(CLOCK_MONOTONIC, ...) as the
value isn't subjected to change when wall time is changed. Still there
are chances to get wrong (non monotonic) values when NTP adjusts
frequencies. Maybe some ifdef magic can be used to even use
CLOCK_MONOTONIC_RAW if it is available and fall back to gettimeofday in
case of older systems. The only thing would be then -lrt on the linker
command line which has to be sorted out somehow.
> feel like wiring up timer_get_us() too ?
Will do in a v2.
Matthias
next prev parent reply other threads:[~2011-11-29 9:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-28 21:40 [U-Boot] [PATCH] sandbox: Add timer simulation Matthias Weisser
2011-11-28 22:57 ` Mike Frysinger
2011-11-29 9:35 ` Matthias Weißer [this message]
2011-11-29 15:06 ` Mike Frysinger
2011-11-29 11:16 ` [U-Boot] [PATCH V2] " Matthias Weisser
2011-11-29 15:25 ` Mike Frysinger
2011-11-29 16:55 ` Simon Glass
2011-11-29 18:40 ` Mike Frysinger
2011-11-29 20:04 ` Simon Glass
2011-11-29 21:41 ` Mike Frysinger
2011-11-29 21:58 ` Simon Glass
2011-12-02 19:48 ` Mike Frysinger
2011-12-02 17:49 ` Mike Frysinger
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=4ED4A74A.1000501@googlemail.com \
--to=m.weisser.m@googlemail.com \
--cc=u-boot@lists.denx.de \
/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: link
Be 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