A class to represent time duration with nano-second/micro-second resolution.  
 More...
#include <TimeDuration.h>
A class to represent time duration with nano-second/micro-second resolution. 
A class to represent time duration with nano-second/micro-second resolution (hh:mm:ss,ss). Internally, it uses the datetime boost library to represent time duration, by using the data type boost::posix_time::time_duration.
- See also
 - DateTime, Date, DatePeriod, DateDuration, TimeInstant, TimeInstantTZ, TimePeriod, TimePeriodTZ 
 
Definition at line 51 of file TimeDuration.h.
 
◆ TimeDuration() [1/2]
      
        
          | te::dt::TimeDuration::TimeDuration  | 
          ( | 
          long  | 
          hours,  | 
        
        
           | 
           | 
          long  | 
          minutes,  | 
        
        
           | 
           | 
          long  | 
          seconds,  | 
        
        
           | 
           | 
          boost::int64_t  | 
          fracSeconds = 0  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Constructor. 
- Parameters
 - 
  
    | hours | A number of hours of a day - from 0 to 23.  | 
    | minutes | A number of minutes of a hour - from 0 to 59.  | 
    | seconds | A number of seconds of a minute - from 0 to 59.  | 
    | fracSeconds | A fractional seconds.  | 
  
   
 
 
◆ TimeDuration() [2/2]
      
        
          | te::dt::TimeDuration::TimeDuration  | 
          ( | 
          boost::posix_time::time_duration &  | 
          t | ) | 
           | 
        
      
 
 
◆ ~TimeDuration()
  
  
      
        
          | virtual te::dt::TimeDuration::~TimeDuration  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
virtual   | 
  
 
 
◆ clone()
◆ getDateTimeType()
  
  
      
        
          | DateTimeType te::dt::TimeDuration::getDateTimeType  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlinevirtual   | 
  
 
 
◆ getFractionalSeconds()
  
  
      
        
          | boost::int64_t te::dt::TimeDuration::getFractionalSeconds  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
It returns the fractional seconds. 
- Returns
 - The the fractional seconds 
 
Definition at line 112 of file TimeDuration.h.
 
 
◆ getHours()
  
  
      
        
          | long te::dt::TimeDuration::getHours  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
It returns the hours of a day - from 0 to 23. 
- Returns
 - The hour of a day. 
 
Definition at line 91 of file TimeDuration.h.
 
 
◆ getMinutes()
  
  
      
        
          | long te::dt::TimeDuration::getMinutes  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
It returns the minutes of a hour - from 0 to 59. 
- Returns
 - The the minutes of a hour. 
 
Definition at line 98 of file TimeDuration.h.
 
 
◆ getSeconds()
  
  
      
        
          | long te::dt::TimeDuration::getSeconds  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
It returns the seconds of a minute - from 0 to 59. 
- Returns
 - The the seconds of a minute. 
 
Definition at line 105 of file TimeDuration.h.
 
 
◆ getTimeDuration() [1/2]
  
  
      
        
          | const boost::posix_time::time_duration& te::dt::TimeDuration::getTimeDuration  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
It returns the boost time duration type. 
- Returns
 - The boost time duration type. 
 
Definition at line 77 of file TimeDuration.h.
 
 
◆ getTimeDuration() [2/2]
  
  
      
        
          | boost::posix_time::time_duration& te::dt::TimeDuration::getTimeDuration  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
It returns the boost time duration type. 
- Returns
 - The boost time duration type. 
 
Definition at line 84 of file TimeDuration.h.
 
 
◆ getTypeCode()
  
  
      
        
          | int te::dt::DateTime::getTypeCode  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlinevirtualinherited   | 
  
 
It returns the data type code associated to date and time values: DATETIME_TYPE. 
- Returns
 - The data type code associated to the date and time values: DATETIME_TYPE. 
 
Implements te::dt::AbstractData.
Definition at line 103 of file DateTime.h.
References te::dt::DATETIME_TYPE.
 
 
◆ operator!=()
  
  
      
        
          | bool te::dt::TimeDuration::operator!=  | 
          ( | 
          const DateTime &  | 
          rhs | ) | 
           const | 
         
       
   | 
  
virtual   | 
  
 
Operator !=. 
- Parameters
 - 
  
    | rhs | The time duration to be compared. | 
  
   
- Returns
 - It returns true if the two time durations are not equal. Otherwise, it returns false. 
 
Implements te::dt::DateTime.
 
 
◆ operator-()
      
        
          | long te::dt::TimeDuration::operator-  | 
          ( | 
          const TimeDuration &  | 
          rhs | ) | 
           const | 
        
      
 
Operator -. 
- Parameters
 - 
  
    | rhs | The right-hand-side time instant. | 
  
   
- Returns
 - It returns the number of seconds between the two time durations.
 
 
 
◆ operator<()
  
  
      
        
          | bool te::dt::TimeDuration::operator<  | 
          ( | 
          const DateTime &  | 
          rhs | ) | 
           const | 
         
       
   | 
  
virtual   | 
  
 
Operator <. 
- Parameters
 - 
  
    | rhs | The right-hand-side time duration to be compared. | 
  
   
- Returns
 - It returns true if the right-hand-side time duration is greater than the lefth side one. Otherwise, it returns false. 
 
Implements te::dt::DateTime.
 
 
◆ operator==()
  
  
      
        
          | bool te::dt::TimeDuration::operator==  | 
          ( | 
          const DateTime &  | 
          rhs | ) | 
           const | 
         
       
   | 
  
virtual   | 
  
 
Operator ==. 
- Parameters
 - 
  
    | rhs | The time duration to be compared. | 
  
   
- Returns
 - It returns true if the two time durations are equal. Otherwise, it returns false. 
 
Implements te::dt::DateTime.
 
 
◆ operator>()
  
  
      
        
          | bool te::dt::TimeDuration::operator>  | 
          ( | 
          const DateTime &  | 
          rhs | ) | 
           const | 
         
       
   | 
  
virtual   | 
  
 
Operator <. 
- Parameters
 - 
  
    | rhs | The right-hand-side time duration to be compared. | 
  
   
- Returns
 - It returns true if the right-hand-side time duration is less than the lefth side one. Otherwise, it returns false. 
 
Implements te::dt::DateTime.
 
 
◆ toString()
  
  
      
        
          | std::string te::dt::TimeDuration::toString  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
virtual   | 
  
 
It returns the time duration in the ISO textual format (hh:mm:ss,ss). 
- Returns
 - The date in the ISO textual format (hh:mm:ss,ss). 
 
Implements te::dt::AbstractData.
 
 
◆ m_timeDuration
  
  
      
        
          | boost::posix_time::time_duration te::dt::TimeDuration::m_timeDuration | 
         
       
   | 
  
protected   | 
  
 
The internal time duration information. 
Definition at line 189 of file TimeDuration.h.
 
 
The documentation for this class was generated from the following file:
- /home/castejon/castejon_files/develop/terralib5/git_release/src/terralib/datatype/TimeDuration.h