[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
BOUNCE rtl@rtlinux.org: Approval required: Non-member submission from [yodaiken@hq2.fsmlabs.com] (fwd)
- To: rtl@rtlinux.org
- Subject: BOUNCE rtl@rtlinux.org: Approval required: Non-member submission from [yodaiken@hq2.fsmlabs.com] (fwd)
- From: root <root>
- Date: Mon, 7 May 2001 03:12:50 -0600 (MDT)
>From owner-rtl Thu May 3 14:49:36 2001
Received: from hq2.fsmlabs.com (hq2.fsmlabs.com [209.155.42.199])
by hq.fsmlabs.com (8.11.2/8.11.2) with SMTP id f43KnaJ18951
for <rtl@fsmlabs.com>; Thu, 3 May 2001 14:49:36 -0600
Received: (qmail 3379 invoked by uid 1002); 3 May 2001 20:42:52 -0000
From: yodaiken@hq2.fsmlabs.com
Date: Thu, 3 May 2001 14:42:52 -0600
To: tfolkers@hamms.as.arizona.edu
Cc: rtl@fsmlabs.com, yodaiken@fsmlabs.com
Subject: Re: [rtl] do_gettimeofday().
Message-ID: <20010503144252.A3275@hq2>
References: <200105022112.f42LC0417422@hamms.as.arizona.edu> <3AF19D99.2B3107F9@opersys.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.3.15i
In-Reply-To: <3AF19D99.2B3107F9@opersys.com>; from karym@opersys.com on Thu, May 03, 2001 at 02:04:09PM -0400
What version of RTL and what processor has the time gain?
clock_gettime is better than do_gettime since it is
the POSIX call and will work on RTbsd as well as RTLinux.
We should just fix the gettime if that's not correct.
> Thomas Folkers wrote:
> >
> > Victor,
> > How come I can't get the time of day from the kernel? If I use
> > do_gettimeofday(), eventually the system will hang. It may not happen
> > right away, but it will hang. I'm trying to time external events and
> > record the exact time an interrupt comes in and the only way to compare
> > that time to other events and to other systems is to have the exact
> > system time. The clock_gettime() routine returns something close to
> > the real system clock time, but then proceeds to gain time at the rate of
> > 35,000 nsecs/sec. That's probably due to a miss calibration in the cpu HZ
> > value. I have looked over the rtl_time.c file and can see where you 'sync'
> > the CLOCK_REALTIME to the results of a do_gettimeofday() call, but then
> > there doesn't seem to be any other 'tweeks' to the time to keep it in
> > sync. So, while the clock_gettime() produces a nice monotonic clock, it
> > bear little resemblance to actual time.
> > So, how do I get the time of day from the kernel?
> >
> > Thanks for you help,
> > Tom
> >
> > --
> >
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > _/_/_/_/ _/_/ _/_/ _/_/_/_/_/ _/_/_/_/ Thomas W. Folkers
> > _/ _/ _/ _/ _/ _/ _/ _/ Telescope Operations Mgr.
> > _/_/_/_/ _/ _/ _/ _/ _/ _/ Sub-Millimeter Telescope
> > _/ _/ _/ _/ _/ _/ Kitt Peak 12M Radio Telescope
> > _/ _/ _/ _/ _/ _/ 933 N. Cherry Ave. Rm. 486
> > _/_/_/_/ _/ _/ _/ _/_/_/_/ Tucson, Arizona 85721
> > ------------------------------------------- email: tfolkers@as.arizona.edu
> > ------------------------------------------ Voice: (520) 626-7837
> > -- http://maisel.as.arizona.edu:8080/ --- Fax: 621-5554 Pager: 446-0760
> > -- http://kp12m.as.arizona.edu/ --- Mobil: 909-1113 Home: 742-9279
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > -- [rtl] ---
> > To unsubscribe:
> > echo "unsubscribe rtl" | mail majordomo@rtlinux.org OR
> > echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.org
> > --
> > For more information on Real-Time Linux see:
> > http://www.rtlinux.org/rtlinux/
>
> --
> ===================================================
> Karim Yaghmour
> karym@opersys.com
> Embedded and Real-Time Linux Expert
> ===================================================