i need to get the milli second off the clock on the computer... now how would i go about getting that? plz can any one help?
i need to get the milli second off the clock on the computer... now how would i go about getting that? plz can any one help?
if u c this i will be asking for help
It returns the CPU time since the program started. The constant CLOCKS_PER_SECOND can convert the return value into seconds. Example:Code:#include <ctime> clock_t std::clock();
Code:#include <ctime> #include <iostream> using namespace std; int main() { // do something CPU intensive here... double seconds = clock() / double(CLOCKS_PER_SECOND); cout << "This program has been running for " << seconds << " seconds." << endl; return 0; }
Last edited by Speedy5; 04-25-2004 at 10:01 AM.
error C2065: 'CLOCKS_PER_SECOND' : undeclared identifier
if u c this i will be asking for help
Could try:
CLK_TCK
or
CLOCKS_PER_SEC
instead
what compiler/IDE are you using?
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
Microsoft Visual C++ 6.0
if u c this i will be asking for help