views:

63

answers:

3

Probably a stupid question, but I couldn't find anything searching...

Is there a standard header that allows me to fetch the current time? Otherwise is there some cross-platform alternative?

+2  A: 

use boost date_time. http://www.boost.org/doc/libs/1_40_0/doc/html/date_time/posix_time.html.

aaa
The current time can be fetched using <ctime>.
sgreeve
@sgr my mistake, you are correct
aaa
+4  A: 

time.h, and the time function.

Matthew Flaschen
+5  A: 

What's wrong with <ctime> ?! It's standard, even MSDN admits:

nc3b
So is ctime portable? Like does it ship with the standard library? Or what?
George Edison