Solved

lap time

Posted on 1998-11-21
4
272 Views
Last Modified: 2010-04-01
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?????
0
Comment
Question by:ragini112198
  • 2
  • 2
4 Comments
 
LVL 5

Expert Comment

by:scrapdog
ID: 1178406
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.
0
 

Author Comment

by:ragini112198
ID: 1178407
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.
0
 
LVL 5

Accepted Solution

by:
scrapdog earned 100 total points
ID: 1178408
Is this enough information?
0
 

Author Comment

by:ragini112198
ID: 1178409
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
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now