cplusplus.com
C++ : Forum : UNIX/Linux Programming : How to get system time in Linux using C+
 
cplusplus.com
Information
Documentation
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs


post How to get system time in Linux using C++

tnjones (38)
Hello,
I have a project where I need to time how long a particular action takes within my program using the system clock. With this in mind, I have researched how to read the system clock in Linux put isn't coming up with much. If anyone can point me in the right direction, I will greatly appreciate it.

Thanks In Advance
Duoas (5974)
http://linux.die.net/man/7/time

Good luck!
jsmith (5804)
You can also try gettimeofday() or setitimer(), both of which will provide you finer granularity than time().
Duoas (5974)
You do know that section 7 is basically "overview and how-to", right?
Topic archived. No new replies allowed.