| | |
Clock tick
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 |
addition api array base based binary bitmap c++ c/c++ char class classes code coding compile console conversion count delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email embed encryption error erroraftercompilation excel file forms fstream function functions game getline givemetehcodez gmail graph gui homework homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker loop looping loops map math matrix matrix3d memory multiple news node output parameter pointer problem program programming project python random read recursion reference rpg std::coutwstring string strings temperature template test text text-file tree url variable vector video visualization win32 windows winsock word wordfrequency wxwidgets






