* timer
@ 2004-09-17 14:25 Ankit Jain
2004-09-17 14:51 ` timer J. David Boyd
2004-09-17 15:10 ` timer Chris DiTrani
0 siblings, 2 replies; 10+ messages in thread
From: Ankit Jain @ 2004-09-17 14:25 UTC (permalink / raw)
To: admin
hi
well i am using linux 9.0 kernel 2.4
i am getting a odd kinda problem
whenever i restart my computer my system watch is
incremented by some amount of hours. i am feelign that
this increment is of some standard amount only
even i feel if there is some battery problem then it
shoudl slow down but in this case it moves ahead
thanks
ankit
________________________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: timer
2004-09-17 14:25 timer Ankit Jain
@ 2004-09-17 14:51 ` J. David Boyd
2004-09-17 15:10 ` timer Chris DiTrani
1 sibling, 0 replies; 10+ messages in thread
From: J. David Boyd @ 2004-09-17 14:51 UTC (permalink / raw)
To: linux-admin
Ankit Jain <ankitjain1580@yahoo.com> writes:
> hi
>
> well i am using linux 9.0 kernel 2.4
>
> i am getting a odd kinda problem
>
> whenever i restart my computer my system watch is
> incremented by some amount of hours. i am feelign that
> this increment is of some standard amount only
>
> even i feel if there is some battery problem then it
> shoudl slow down but in this case it moves ahead
>
It is probably being reset to Zulu (UDT, whatever they call it) time.
I had this happening for a while.
I think I went into, no, sorry, I don't remember at all where I
changed the setting that says whether or not my real time clock is set
to Zulu. When I set that to no, the system stopped updating my time
every occurrence of rebooting.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: timer
2004-09-17 14:25 timer Ankit Jain
2004-09-17 14:51 ` timer J. David Boyd
@ 2004-09-17 15:10 ` Chris DiTrani
1 sibling, 0 replies; 10+ messages in thread
From: Chris DiTrani @ 2004-09-17 15:10 UTC (permalink / raw)
To: Ankit Jain; +Cc: admin
On Fri, 2004-09-17 at 10:25, Ankit Jain wrote:
>
> whenever i restart my computer my system watch is
> incremented by some amount of hours. i am feelign that
> this increment is of some standard amount only
This may be helpful:
http://www.linuxsa.org.au/tips/time.html
CD
^ permalink raw reply [flat|nested] 10+ messages in thread
* timer
@ 2004-09-30 11:38 Ankit Jain
0 siblings, 0 replies; 10+ messages in thread
From: Ankit Jain @ 2004-09-30 11:38 UTC (permalink / raw)
To: linux prg
[-- Attachment #1: Type: text/plain, Size: 254 bytes --]
Note: forwarded message attached.
________________________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html
[-- Attachment #2: Type: message/rfc822, Size: 4696 bytes --]
From: MAILER-DAEMON@yahoo.com
To: ankitjain1580@yahoo.com
Subject: failure delivery
Date: 30 Sep 2004 10:39:59 -0000
Message from yahoo.com.
Unable to deliver message to the following address(es).
<George.K.Huber@us.army.mil>:
143.69.243.33 does not like recipient.
Remote host said: 452 4.2.1 Mailbox temporarily disabled: George.K.Huber@us.army.mil
Giving up on 143.69.243.33.
I'm not going to try again; this message has been in the queue too long.
--- Original message follows.
Return-Path: <ankitjain1580@yahoo.com>
Message-ID: <20040929093959.70767.qmail@web52904.mail.yahoo.com>
Received: from [202.164.100.133] by web52904.mail.yahoo.com via HTTP; Wed, 29 Sep 2004 10:39:58 BST
Date: Wed, 29 Sep 2004 10:39:58 +0100 (BST)
From: Ankit Jain <ankitjain1580@yahoo.com>
Subject: RE: timer->result
To: "Huber, George K RDECOM CERDEC STCD SRI" <George.K.Huber@us.army.mil>
In-Reply-To: <E3E30069B061524E90BCEE4417E30661138539@monm207.monmouth.army.mil>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
first of all thanks for help
--- "Huber, George K RDECOM CERDEC STCD SRI"
<George.K.Huber@us.army.mil> wrote:
> Ankit wrote:
>
> > #include<stdio.h>
> > #include<sys/time.h>
> > #include<time.h>
>
> > int main(void)
> > {
> > struct timeval t1,t2,result;
> > gettimeofday(&t1,NULL);
> > usleep(500);
> > gettimeofday(&t2,NULL);
> > timersub(&t2,&t1,&result);
> > printf("%ld",result.tv_usec);
> >}
> >now technically i feel it should display 500
> >microsecond even not accurate then also it should
> show
> >near by 500 or less than 600 microsecond atleast.
>
> Why?
>
> A quick glance at the man page for usleep reveals:
>
> "BUGS
>
> Probably not acurate on many machines down to the
> microsecond. Count on precision only to -4 or
> maybe
> -3.
> "
>
> You may want to try using `nanosleep', but first
> read
> the man-page, paying close attention to the BUGS
> section.
>
> Also the first sentence from the DESCRIPTION section
> is
> particularly informative:
>
> "nanosleep delays the exection of the program for at
>
> least the time specified in *req."
>
>
> Something else to consider. Linux is a
> multi-tasking operating
> system, meaning that while your process is sleeping
> it is swapped
> out an another process executed. As an example,
> consider the
> following program:
>
> #include <time.h>
> #include <stdio.h>
> #include <sys/time.h>
> #include <unistd.h>
>
> /* this program must be linked with librt */
as u said to link it.... can u tell me the linker or
compiler options needed?
>
> int main(int argc, char** argv)
> {
> long timediff;
> struct timespec tpstart;
> struct timespec tpend;
> struct timeval tpsleep;
>
> tpsleep.tv_sec = 0;
> tpsleep.tv_usec = 100;
>
> clock_gettime(CLOCK_REALTIME, &tpstart);
>
> select(0, NULL, NULL, NULL, &tpsleep);
>
> clock_gettime(CLOCK_REALTIME, &tpend);
>
> timediff = MILLION*(tpend.tv_sec -
> tpstart.tv_sec) +
> (tpend.tv_nsec -
> tpend.tv_nsec) / 1000;
>
> printf("Select took %ld micorseconds\n",
> timediff);
> }
>
> On my system this returned the following values:
>
> Select took 1444 micorseconds
> Select took 467 micorseconds
> Select took 15983 micorseconds
> Select took 14589 micorseconds
> Select took 8730 micorseconds
> Select took 21619 micorseconds
> Select took 13304 micorseconds
> Select took 8764 micorseconds
> Select took 21604 micorseconds
> Select took 7117 micorseconds
>
> Look at the large differences in the reported time.
> I would suspect that
> for the large differences another process was
> swapped in and ran for its
> alotted `quanta'. Maybe if this process was
> switched to a higher priority
> the timing values would be different.
>
> Just out of curosity? what are you trying to do?
>
> George
>
>
>
> -
> To unsubscribe from this list: send the line
> "unsubscribe linux-c-programming" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at
> http://vger.kernel.org/majordomo-info.html
>
________________________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html
^ permalink raw reply [flat|nested] 10+ messages in thread* timer
@ 2002-06-19 11:26 dunk fordyce
2002-06-19 13:25 ` timer dunk fordyce
0 siblings, 1 reply; 10+ messages in thread
From: dunk fordyce @ 2002-06-19 11:26 UTC (permalink / raw)
To: alsa-devel
would the timer be usefull to trigger sounds at specific times?
im reading the example but....
cheers
----------------------------------------------------------------------------
Bringing you mounds of caffeinated joy
>>> http://thinkgeek.com/sf <<<
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: timer
2002-06-19 11:26 timer dunk fordyce
@ 2002-06-19 13:25 ` dunk fordyce
2002-06-19 14:10 ` timer Paul Davis
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: dunk fordyce @ 2002-06-19 13:25 UTC (permalink / raw)
To: alsa-devel
ok, so maybe the sequencer would be a better choice?
On Wed, 19 Jun 2002 13:26:21 +0200
dunk fordyce <mailinglist@dunkfordyce.co.uk> wrote:
> would the timer be usefull to trigger sounds at specific times?
>
> im reading the example but....
>
> cheers
>
> ----------------------------------------------------------------------------
> Bringing you mounds of caffeinated joy
> >>> http://thinkgeek.com/sf <<<
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/alsa-devel
----------------------------------------------------------------------------
Bringing you mounds of caffeinated joy
>>> http://thinkgeek.com/sf <<<
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: timer
2002-06-19 13:25 ` timer dunk fordyce
@ 2002-06-19 14:10 ` Paul Davis
2002-06-19 14:59 ` timer dunk fordyce
[not found] ` <200206191507.QAA32531@mx1.eliteukserve.net>
2 siblings, 0 replies; 10+ messages in thread
From: Paul Davis @ 2002-06-19 14:10 UTC (permalink / raw)
To: him; +Cc: alsa-devel
>ok, so maybe the sequencer would be a better choice?
>
>On Wed, 19 Jun 2002 13:26:21 +0200
>dunk fordyce <mailinglist@dunkfordyce.co.uk> wrote:
>
>> would the timer be usefull to trigger sounds at specific times?
>>
>> im reading the example but....
you're also not really telling us anything about what you're trying to
do.
--p
----------------------------------------------------------------------------
Bringing you mounds of caffeinated joy
>>> http://thinkgeek.com/sf <<<
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: timer
2002-06-19 13:25 ` timer dunk fordyce
2002-06-19 14:10 ` timer Paul Davis
@ 2002-06-19 14:59 ` dunk fordyce
2002-06-19 15:23 ` timer dunk fordyce
[not found] ` <200206191507.QAA32531@mx1.eliteukserve.net>
2 siblings, 1 reply; 10+ messages in thread
From: dunk fordyce @ 2002-06-19 14:59 UTC (permalink / raw)
To: him; +Cc: mailinglist, alsa-devel
so i want to use the sequencer - later i want to use some midi but at the moment all i want is for it to trigger samples.
can someone give me some example code for setting something like that up? pseudo is fine :)
even just the code ripped out of another app would be good.
anything is good
On Wed, 19 Jun 2002 15:25:01 +0200
dunk fordyce <mailinglist@dunkfordyce.co.uk> wrote:
> ok, so maybe the sequencer would be a better choice?
>
> On Wed, 19 Jun 2002 13:26:21 +0200
> dunk fordyce <mailinglist@dunkfordyce.co.uk> wrote:
>
> > would the timer be usefull to trigger sounds at specific times?
> >
> > im reading the example but....
> >
> > cheers
> >
> > ----------------------------------------------------------------------------
> > Bringing you mounds of caffeinated joy
> > >>> http://thinkgeek.com/sf <<<
> >
> > _______________________________________________
> > Alsa-devel mailing list
> > Alsa-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/alsa-devel
>
> ----------------------------------------------------------------------------
> Bringing you mounds of caffeinated joy
> >>> http://thinkgeek.com/sf <<<
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/alsa-devel
----------------------------------------------------------------------------
Bringing you mounds of caffeinated joy
>>> http://thinkgeek.com/sf <<<
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: timer
2002-06-19 14:59 ` timer dunk fordyce
@ 2002-06-19 15:23 ` dunk fordyce
0 siblings, 0 replies; 10+ messages in thread
From: dunk fordyce @ 2002-06-19 15:23 UTC (permalink / raw)
To: him; +Cc: mailinglist, alsa-devel
i really need a kick in the vague right direction
thanks
On Wed, 19 Jun 2002 16:59:13 +0200
dunk fordyce <mailinglist@dunkfordyce.co.uk> wrote:
> so i want to use the sequencer - later i want to use some midi but at the moment all i want is for it to trigger samples.
>
> can someone give me some example code for setting something like that up? pseudo is fine :)
>
> even just the code ripped out of another app would be good.
>
> anything is good
>
>
>
> On Wed, 19 Jun 2002 15:25:01 +0200
> dunk fordyce <mailinglist@dunkfordyce.co.uk> wrote:
>
> > ok, so maybe the sequencer would be a better choice?
> >
> > On Wed, 19 Jun 2002 13:26:21 +0200
> > dunk fordyce <mailinglist@dunkfordyce.co.uk> wrote:
> >
> > > would the timer be usefull to trigger sounds at specific times?
> > >
> > > im reading the example but....
> > >
> > > cheers
> > >
> > > ----------------------------------------------------------------------------
> > > Bringing you mounds of caffeinated joy
> > > >>> http://thinkgeek.com/sf <<<
> > >
> > > _______________________________________________
> > > Alsa-devel mailing list
> > > Alsa-devel@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/alsa-devel
> >
> > ----------------------------------------------------------------------------
> > Bringing you mounds of caffeinated joy
> > >>> http://thinkgeek.com/sf <<<
> >
> > _______________________________________________
> > Alsa-devel mailing list
> > Alsa-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/alsa-devel
>
> ----------------------------------------------------------------------------
> Bringing you mounds of caffeinated joy
> >>> http://thinkgeek.com/sf <<<
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/alsa-devel
----------------------------------------------------------------------------
Bringing you mounds of caffeinated joy
>>> http://thinkgeek.com/sf <<<
^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <200206191507.QAA32531@mx1.eliteukserve.net>]
* Re: timer
[not found] ` <200206191507.QAA32531@mx1.eliteukserve.net>
@ 2002-06-19 15:08 ` dunk fordyce
0 siblings, 0 replies; 10+ messages in thread
From: dunk fordyce @ 2002-06-19 15:08 UTC (permalink / raw)
To: Paul Davis; +Cc: alsa-devel
yea i realised :)
see the other mail
On Wed, 19 Jun 2002 10:10:55 -0400
Paul Davis <pbd@op.net> wrote:
> >ok, so maybe the sequencer would be a better choice?
> >
> >On Wed, 19 Jun 2002 13:26:21 +0200
> >dunk fordyce <mailinglist@dunkfordyce.co.uk> wrote:
> >
> >> would the timer be usefull to trigger sounds at specific times?
> >>
> >> im reading the example but....
>
> you're also not really telling us anything about what you're trying to
> do.
>
> --p
----------------------------------------------------------------------------
Bringing you mounds of caffeinated joy
>>> http://thinkgeek.com/sf <<<
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2004-09-30 11:38 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-17 14:25 timer Ankit Jain
2004-09-17 14:51 ` timer J. David Boyd
2004-09-17 15:10 ` timer Chris DiTrani
-- strict thread matches above, loose matches on Subject: below --
2004-09-30 11:38 timer Ankit Jain
2002-06-19 11:26 timer dunk fordyce
2002-06-19 13:25 ` timer dunk fordyce
2002-06-19 14:10 ` timer Paul Davis
2002-06-19 14:59 ` timer dunk fordyce
2002-06-19 15:23 ` timer dunk fordyce
[not found] ` <200206191507.QAA32531@mx1.eliteukserve.net>
2002-06-19 15:08 ` timer dunk fordyce
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.