time(0) will give you the current time in seconds. mktime() can be used to produce a time in seconds from a struct tm. you must compensate for the timezone offsets IF the time you are referencing is not on the local machine (ex., if you want to know the # of seconds between "now" in Austin, TX and 1:30 AM July 29, 2003 in London, UK).