Changeset 11393


Ignore:
Timestamp:
07/14/11 08:56:17 (13 years ago)
Author:
tbretz
Message:
Added Time_t()
Location:
trunk/FACT++/src
Files:
2 edited

Legend:

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

    r11215 r11393  
    186186// --------------------------------------------------------------------------
    187187//
     188// @returns seconds since 1970/1/1
     189//
     190time_t Time::Time_t() const
     191{
     192    return (date().modjulian_day()-40587)*24*60*60 + time_of_day().total_seconds();
     193}
     194
     195// --------------------------------------------------------------------------
     196//
    188197//! @returns the time in a format needed for root's TAxis
    189198//!
  • trunk/FACT++/src/Time.h

    r11215 r11393  
    9494    double SecondsOfDay() const;
    9595
     96    time_t Time_t() const;
    9697    double UnixTime() const;
    9798    double RootTime() const;
Note: See TracChangeset for help on using the changeset viewer.