Re: TIB: Convert - Came to my senses, all you really need is this :)


[Prev][Next][Index][Thread]

Re: TIB: Convert - Came to my senses, all you really need is this :)



   CTime TheTime = CTime::GetCurrentTime();            // CTime Class Function that creates an object 'TheTime' containing the current time.
   CTime NewTime = TheTime;                                   // Creates a copy object of 'TheTime' named 'NewTime'
   CTimeSpan elapsedTime = NewTime - TheTime;      // CTime Class Function for Time Spans . . .
   
   while (elapsedTime < 8 )                                        // Performs the lines enclosed in {'s until elapsedTime is no longer less than 8
   {
    NewTime = CTime::GetCurrentTime();                    // Updates the 'NewTime' object.
    elapsedTime = NewTime - TheTime;                       // Updates the 'elapsedTime' object.
   }
 
char reply[32];
sprintf(reply,"%d seconds have passed",elapsedTime); // Fills the character array 'reply' with the intiger value for 'elapsedTime' and the text "seconds have passed".
MessageBox(reply,MB_OK);                                      // Creates a Message Box with the text contained in the character aray 'reply', with an OK button.
 
 
And there you have it . . . Your solution for a PAUSE function.
*BOWs* :)
 
Andon M. Coleman
 
Senior Programmer
R&D
 
Nothing, Inc

References: