0

C: Printing Current System Time

Posted by Joys of Programming on in C/C++

There are multiple functions using which you can get the current system time in seconds like gettimeofday().But usage of clock_gettime() is recommended. clock_gettime() returns the number of seconds and nano seconds since the Epoch (January 1, 1970). It’s syntax is where clk_id can take values like CLOCK_REALTIME (which we will use in the current program [...]

Tags: , , , ,

Copyright © 2009-2012 Joys of Programming All rights reserved.
Desk Mess Mirrored v1.8.1 theme from BuyNowShop.com.