| | |
Clock tick
Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved |
Im guessing you mean in relation to realy time, you may want to use CLOCKS_PER_SEC to get things in terms of time and in terms of time to clocks for example divide clock()/CLOCKS_PER_SEC withh give you how many seconds, etc and if you want to wait for x seconds do seconds*CLOCKS_PER_SEC
Chris
Chris
Knowledge is power -- But experience is everything
The time_t type is an implementation-defined arithmetic type capable of representing times. Use difftime function to get the difference between two times of type time_t in seconds as a double value:
As usually, it's equal to 1 sec (but it's not the language standard requirement).
c Syntax (Toggle Plain Text)
#include <time.h> ... time_t t; time(&t); printf("time_t step %f sec\n",difftime(t+1,t)); // time_t precision
![]() |
Similar Threads
- string array (C++)
- Ultimate PC? (Geeks' Lounge)
- assembly versus copmiler{gcc} (C++)
- C expert help me! Write a TSR program that changes the background color ... (C)
- Measuring Performance... (C++)
- c++ Timer? (C++)
- Pygame (Python)
- just for fun (Python)
- I neeeeeeeed Your Help (Assembly)
Other Threads in the C++ Forum
- Previous Thread: Where does Modulus fit in with PEMDAS?
- Next Thread: double data type
| Thread Tools | Search this Thread |
api array based beginner binary bitmap c++ c/c++ calculator char class classes code coding compile compiler console conversion count database delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream int integer java lib linkedlist linker linux list loop looping loops map math matrix memory multiple news node number output parameter pointer problem program programming project python read recursion recursive reference return rpg string strings struct temperature template templates test text text-file tree unix url variable vector visualstudio win32 windows winsock word wordfrequency wxwidgets






