Wednesday, July 1, 2009

C... Learning : Chapter 8 of 8 "The C STL"

Yesterday I finished the resumption of C. I didn't resumpt the Structures and the Access of Files. Since I know there existence and usance I will learn them practicall (permamnently) when I'm going to need them.

That also was the spirit while reading 8th chapter "The C Standar Template Library". No matter how much I red all the functions I was never going to remember them If I hadn't a prattical usance for them. So I just red the time.h header's functions which I found mostly interesting, especially the clock_t_clock() with which you could calculate the time in seconds passed between 2 moments in the program's execution,

On that I've created a programm, a clock actually that counts the pass of time showing secs, minuites and hours. Also I've created a header function which when you call it you pass an amount of time in secs and this function will pause the programm's execution for that amount of time
Actually it occupies the CPU with a loop checking each time the time difference from when the loop started and the curent moment until it reaches the amount of secs given by the user. So its not much of use since you cant use it as a timer in a real time game loop or at least I think so.

No comments: