From: Sam Pham <anhmn@yahoo.com>
To: Jay Foster <jay.foster@systech.com>,
eCos Discuss <ecos-discuss@sources.redhat.com>
Subject: RE: [ECOS] clock_settime() help
Date: Thu, 28 Oct 2004 21:20:00 -0000 [thread overview]
Message-ID: <20041028173904.91930.qmail@web54106.mail.yahoo.com> (raw)
In-Reply-To: <80B97DE95AEED311BA580050047FE98494FBFD@mail.systech.com>
Thanks for your response. My application needs to
have timestamp of milli-seconds resolution. Wallclock
is only seconds.
--- Jay Foster <jay.foster@systech.com> wrote:
> Perhaps you should use cyg_libc_time_settime()
> instead. I have not had any
> problems using this to set the system time of day.
> This does require a
> wallclock package to be included in your
> configuration
> (CYGPKG_IO_WALLCLOCK). You can use the default
> wallclock emulation device.
> Jay
>
> -----Original Message-----
> From: Sam Pham [mailto:anhmn@yahoo.com]
> Sent: Thursday, October 28, 2004 9:55 AM
> To: eCos Discuss
> Subject: [ECOS] clock_settime() help
>
>
> Hi all,
>
> I'm having trouble with calling the clock_settime()
> function. My application has the need of setting
> the
> clock to the current time. At first, I called
> clock_settime() inside my ISR, and then outside of
> this ISR, I called clock_gettime() to verify if the
> current time was set. I noticed that sometimes
> clock_settime() failed because clock_gettime()
> returned a non-current time value. So I decided to
> call clock_settime() in a thread with all interrupts
> disabled by calling function
> cyg_interrupt_disable().
> However, I still observed the same failure as
> before.
>
> Could anyone explain to me how I should be using
> function clock_settime()? Its implementation is
> very
> simple - just change the counter value. However, it
> looks like if the kernel is in certain states, then
> it
> won't allow anything to change this counter value.
>
> Thanks.
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail Address AutoComplete - You start. We
> finish.
> http://promotions.yahoo.com/new_mail
>
> --
> Before posting, please read the FAQ:
> http://ecos.sourceware.org/fom/ecos
> and search the list archive:
> http://ecos.sourceware.org/ml/ecos-discuss
>
> --
> Before posting, please read the FAQ:
> http://ecos.sourceware.org/fom/ecos
> and search the list archive:
> http://ecos.sourceware.org/ml/ecos-discuss
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
next prev parent reply other threads:[~2004-10-28 17:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-28 17:39 Jay Foster
2004-10-28 21:20 ` Sam Pham [this message]
2004-10-29 10:00 ` sandeep
2004-11-01 16:08 ` Sam Pham
-- strict thread matches above, loose matches on Subject: below --
2004-10-25 14:55 [ECOS] posix time functions Nick Garnett
2004-10-28 17:25 ` [ECOS] clock_settime() help Sam Pham
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=20041028173904.91930.qmail@web54106.mail.yahoo.com \
--to=anhmn@yahoo.com \
--cc=ecos-discuss@sources.redhat.com \
--cc=jay.foster@systech.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).