?
Solved

lap time

Posted on 1998-11-21
4
Medium Priority
?
278 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 400 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
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…
Suggested Courses

752 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