newbie - need help for timer proj for school 
Author Message
 newbie - need help for timer proj for school

I hope someone here can help me.  I'm lost.

I'm trying to include a timer that displays and counts up as part of my
project for class (like 0 - 2 minutes).

I've looked at Timer, Sleep, Wait, TimeGetTime and none have been very
accurate (I think it's because the printout has to refresh to show each
second).

I think I have a formula now that calculates elapsed time but the time
display is really erratic like it's making up for lost processing time.

Is there anyone who can help me to figure out how to get a countup timer
that displays elapsed minutes and seconds and runs smooth?

I'd really appreciate it ;-)



Sun, 17 Apr 2005 07:50:48 GMT  
 newbie - need help for timer proj for school


Quote:
>I hope someone here can help me.  I'm lost.

>I'm trying to include a timer that displays and counts up as part of my
>project for class (like 0 - 2 minutes).

>I've looked at Timer, Sleep, Wait, TimeGetTime and none have been very
>accurate (I think it's because the printout has to refresh to show each
>second).

>I think I have a formula now that calculates elapsed time but the time
>display is really erratic like it's making up for lost processing time.

>Is there anyone who can help me to figure out how to get a countup timer
>that displays elapsed minutes and seconds and runs smooth?

Depending on the platform you're on, the timer accuracy can be
anything from 10ms to 50ms.  Any of the 98/ME machines will only give
you 50ms resolution, so there will always be some loss.
Other applications stealing cycles from your application also impact,
so there is no easy solution here.
There is another issue though and that is the update of the display.
If there is anything intensive happening, the update may not get to
complete, so the time output will become erratic.
DoEvents or an explicit call to the display control's Refresh will
allow the Form and/or the control to refresh themselves.
At what intervals are you displaying, btw  ?

Quote:
>I'd really appreciate it ;-)

Tease.  ;-)

--
Regards, Frank



Sun, 17 Apr 2005 08:06:09 GMT  
 newbie - need help for timer proj for school
Thanks for helping me Frank -- I'm so new at this.

My display is just a text frame that I'm trying to refresh each second.  I
looked up DoEvents and I'm afraid if I use that, it will through my timer
off while it's waiting for the screen to refresh.  I really want this to be
fairly accurate and to not vary too much on my instructor's computer.

My longest timing is 40 minutes and I'm afraid I'm not going to be able to
find anything that will work well enough.

BTW a friend of mine showed me a program he did that seemed pretty accurate
but he did that in Flash and my class is in VBA

Thanks for trying to help me out

B

Quote:


> >I hope someone here can help me.  I'm lost.

> >I'm trying to include a timer that displays and counts up as part of my
> >project for class (like 0 - 2 minutes).

> >I've looked at Timer, Sleep, Wait, TimeGetTime and none have been very
> >accurate (I think it's because the printout has to refresh to show each
> >second).

> >I think I have a formula now that calculates elapsed time but the time
> >display is really erratic like it's making up for lost processing time.

> >Is there anyone who can help me to figure out how to get a countup timer
> >that displays elapsed minutes and seconds and runs smooth?

> Depending on the platform you're on, the timer accuracy can be
> anything from 10ms to 50ms.  Any of the 98/ME machines will only give
> you 50ms resolution, so there will always be some loss.
> Other applications stealing cycles from your application also impact,
> so there is no easy solution here.
> There is another issue though and that is the update of the display.
> If there is anything intensive happening, the update may not get to
> complete, so the time output will become erratic.
> DoEvents or an explicit call to the display control's Refresh will
> allow the Form and/or the control to refresh themselves.
> At what intervals are you displaying, btw  ?

> >I'd really appreciate it ;-)

> Tease.  ;-)

> --
> Regards, Frank



Sun, 17 Apr 2005 09:30:10 GMT  
 newbie - need help for timer proj for school
Take a look at the Common Controls Replacement Project.
http://www.mvps.org/ccrp/controls/ccrptimer5.htm. They have a timer that is
very nice and extremely accurate, and simple to set up (and it's free). It
uses the multimedia timer, thus providing true 1ms resolution (if supported
by the hardware).

I've built a lap counter that has repeatedly tested accurate to within 3-5ms
on a 400mhz P2. (with careful app management and screen refresh techniques
of course).

The timer also comes with a shrink wrapped stopwatch and countdown timer.

They have many excellent controls that are direct drop-ins for MS stock
controls. Well documented (sample projects as well), and well worth the look

Calan


Quote:
> I hope someone here can help me.  I'm lost.

> I'm trying to include a timer that displays and counts up as part of my
> project for class (like 0 - 2 minutes).

> I've looked at Timer, Sleep, Wait, TimeGetTime and none have been very
> accurate (I think it's because the printout has to refresh to show each
> second).

> I think I have a formula now that calculates elapsed time but the time
> display is really erratic like it's making up for lost processing time.

> Is there anyone who can help me to figure out how to get a countup timer
> that displays elapsed minutes and seconds and runs smooth?

> I'd really appreciate it ;-)



Sun, 17 Apr 2005 11:03:09 GMT  
 newbie - need help for timer proj for school
Thanks Calan, that helped alot.

B

Quote:
> Take a look at the Common Controls Replacement Project.
> http://www.mvps.org/ccrp/controls/ccrptimer5.htm. They have a timer that
is
> very nice and extremely accurate, and simple to set up (and it's free). It
> uses the multimedia timer, thus providing true 1ms resolution (if
supported
> by the hardware).

> I've built a lap counter that has repeatedly tested accurate to within
3-5ms
> on a 400mhz P2. (with careful app management and screen refresh techniques
> of course).

> The timer also comes with a shrink wrapped stopwatch and countdown timer.

> They have many excellent controls that are direct drop-ins for MS stock
> controls. Well documented (sample projects as well), and well worth the
look

> Calan



> > I hope someone here can help me.  I'm lost.

> > I'm trying to include a timer that displays and counts up as part of my
> > project for class (like 0 - 2 minutes).

> > I've looked at Timer, Sleep, Wait, TimeGetTime and none have been very
> > accurate (I think it's because the printout has to refresh to show each
> > second).

> > I think I have a formula now that calculates elapsed time but the time
> > display is really erratic like it's making up for lost processing time.

> > Is there anyone who can help me to figure out how to get a countup timer
> > that displays elapsed minutes and seconds and runs smooth?

> > I'd really appreciate it ;-)



Sun, 17 Apr 2005 14:13:30 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Newbie needs specific timer help

2. Querying Proj Srvr to return a Proj Center view-like recordset

3. Proj 98 VBA vs Proj 2000 VBA

4. school project need help now

5. Need Help on a school project

6. I need help for school

7. Urgent Help needed for School Project!!

8. Help Needed Urgently (for school)

9. NEWBIE Question: VB/SQL 7 simple database - school assignment

10. Q: Timer problem (need simple count up timer)

11. Q: Timer problem (need simple count up timer)

12. Need Report to look at SQL Data source ( VB / CR newbie needs help)

 

 
Powered by phpBB® Forum Software