Link to home
Start Free TrialLog in
Avatar of ragini112198
ragini112198

asked on

lap time

I wanted to know how can u find the lap time that is given the elapsed time how can u find the lap time.l
for ex if u have an elapsed time button and a start button, a stop button,and a lap time button then when u click on the
start button then this starts the counter and shows the time
on the elapsed time now if u click on the lap time button this should freeze the display and when u click it again it should show the elapsed time as the time that has lasped +time that was previosly tehre.how do u do this in motif?????
any suggestions?????
Avatar of scrapdog
scrapdog
Flag of United States of America image

The lap time is just a "snapshot" of the elapsed time.

Make a variable to store the lap time, and a flag to indicate whether elapsed time or lap time is display (true for lap time, false for elapsed time).

When the lap time button is pressed, move the current elapsed time to lap time.  Then toggle the flag.

In the procedure that displays the time, check the flag.  If it is true, display the value in the lap time variable.  If it is false, display the value in elapsed time.
Avatar of ragini112198
ragini112198

ASKER

Thanks a lot for the person whoever it is.i needed it for getting my assignment done for monday and i just got it in time.Thanks  a lot.
ASKER CERTIFIED SOLUTION
Avatar of scrapdog
scrapdog
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks a lot scrapdog for ur help.it was really needed but i got to still work on it and if i have problems with it i will post it tomorrow.please do help.thanks a lot for ur help