CL103 - Computer Programming - Lab # ## (Timing& Delay Practice)
CL103 - Computer Programming - Lab # ## (Timing& Delay Practice)
CL103 - Computer Programming - Lab # ## (Timing& Delay Practice)
Instructions:
Getting Started
/**
Sample Output-1
Welcome to Time Wasting Programming ... !!!
End of wait
/**
Sample Output-1
Delay for three seconds
Done!
Time to do 60000000 empty loops is 0.1 seconds
Press any key to continue . . .
Sample Output-2
Delay for three seconds
Done!
Time to do 30000000 empty loops is 0.1 seconds
Press any key to continue . . .
*/
#include <time.h>
#include <iostream>
using namespace std;
int main()
{
// Display operating system-style date and time.
// help resource ...
//ms-help://MS.VSCC.v90/MS.msdnexpress.v90.en/dv_vccrt/html/280e00f2-
2b93-4ece-94cd-e048484c6cc7.htm
char tmpbuf[128];;
_strtime_s( tmpbuf, 128 );
cout<<"OS Time\t:\t"<<tmpbuf;
_strdate_s( tmpbuf, 128 );
cout<<"\nOS Date\t:\t"<<tmpbuf<<endl<<endl;
return (0);
}
/*
1. Sample Output...
OS Time : 08:55:57
OS Date : 04/12/12
2. Sample Output...
OS Time : 08:56:34
OS Date : 04/12/12
*/