Hi, Could anyone explain how to use the C library's <time.h> header file to get the time in the internal clock?
I am currently using the asctime( ) function which gives the day, date, time and year. However, what i want is that whenever i call this function, it gives a different time( the actual time ) since time is not static and is continuously changing. However, whenever i call this function twice, it gives the exact same time (even the seconds are the same). Btw, my first call and second call do have a time gap between them which is governed by a condition which if only true would call the asctime( ) function for the second time. I have even tried storing the time from my first call in a file, then after some time, calling the asctime( ) function again and then reading the time that i stored from the file that i created. But it still gives the exact same time!! The reason i want 2 different times is so that i can calculate the difference between these times which i will use in calculating a price Eg:- price/ hr Thanks alot!!