Advertisement

gettimeofday or such

Started by May 04, 2005 06:43 AM
1 comment, last by 255 19 years, 6 months ago
Okay, How do I get the current time of the day? All I want is a number between 0-23. I want it to use the systems clock, no messing around with custom timezones or such ( this is the reason im posting here anyway, as I dont really get the timezone thing in getimeofday() ) Can anybody post a short snippet of code to help me out?
- Me
not in linux at the moment, but umm...
struct timeval tv;gettimeofday( &tv , NULL );

is that what you mean?
This space for rent.
Advertisement
man 3 asctime

This topic is closed to new replies.

Advertisement