In C / C ++, suppose I have the following values:
int year = 2010; int month = 6; int day = 15; int hour = 14; int minute = 52; int seconds = 34; int microseconds = 141231;
What is the easiest way to convert this to timeval? I think timeval is the time since January 1, 1970? But figuring it out manually each time seems very tedious. What is the easiest (and fastest) way to do this?
thanks
source share