| | |
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 arrays beginner binary bitmap c++ c/c++ calculator char class classes code compile compiler console conversion count data delete desktop developer directshow dll download dynamic encryption error file forms fstream function functions game getline givemetehcodez google graph gui homeworkhelper iamthwee ifstream input int integer java lib library linkedlist linker linux loop looping loops map math matrix memory newbie news node number output parameter pointer problem program programming project proxy python random read recursion recursive return string strings struct studio temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






