Ignore:
Timestamp:
Apr 22, 2011, 8:50:41 PM (10 years ago)
Author:
tbretz
Message:
Added GetUnixTime
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/Time.cc

    r10252 r10454  
    159159// --------------------------------------------------------------------------
    160160//
     161// Return seconds since 1970/1/1
     162//
     163time_t Time::GetUnixTime() const
     164{
     165    const time_duration unx = *this - ptime(fUnixOffset);
     166    return unx.total_seconds();
     167}
     168
     169// --------------------------------------------------------------------------
     170//
    161171//! Returns a string with the contents of the Time object formated
    162172//! as defined in format.
     
    277287    return in;
    278288}
     289
Note: See TracChangeset for help on using the changeset viewer.