process time

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yodeeps
    New Member
    • Feb 2010
    • 5

    process time

    Gets the current time of day save it in “StartTimeW” and “StartTimeC”,
    Gets the current time of day save in “EndTimeW” and “EndTimeC”,
    Computes & displays the time it took to read and write the total file in:
    a)CPU milli-seconds (amount of time your program used the CPU to do work)
    b)Wall-clock milli-seconds (real-world time at start of program to real-world time at end of pro-gram)
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    You haven't asked a question!

    Comment

    • yodeeps
      New Member
      • Feb 2010
      • 5

      #3
      The question is that how to write the program for the statements.

      Comment

      • donbock
        Recognized Expert Top Contributor
        • Mar 2008
        • 2427

        #4
        The standard C time-functions are in <time.h>; and probably somewhere different for C++.

        Comment

        • yodeeps
          New Member
          • Feb 2010
          • 5

          #5
          But i wanted the code for the starttime and the endtime of the program and the time it took to read the file.

          Comment

          • Banfa
            Recognized Expert Expert
            • Feb 2006
            • 9067

            #6
            That's easy the C++ header name is <ctime> it contains the same functions as the C header <time.h>

            Simply read up on the functions in that header (there is a reference here) and then write the appropriate code to implement the functionality you want.

            Comment

            • yodeeps
              New Member
              • Feb 2010
              • 5

              #7
              thats wat i am not getting the code!!!!!

              Comment

              • donbock
                Recognized Expert Top Contributor
                • Mar 2008
                • 2427

                #8
                Originally posted by yodeeps
                thats wat i am not getting the code!!!!!
                The experts on this site are not going to write the code for you. You need to do that yourself. If something doesn't work right then show us the relevant code, tell us what happened and what you expected to happen.

                At this point, since you don't have any code for us to look at, we're trying to point you towards the relevant library functions. You should follow the references and at least identify which of <time.h>/<ctime> functions are relevant to your problem.

                Comment

                Working...