MCP7940  v1.2.0
Arduino Library for the MCP7940N and MCP7940M Real-time clocks
TimeSpan Class Reference

Timespan class which can represent changes in time with seconds accuracy. More...

Public Member Functions

 TimeSpan (int32_t seconds=0)
 Default constructor.
 
 TimeSpan (int16_t days, int8_t hours, int8_t minutes, int8_t seconds)
 Overloaded constructor.
 
 TimeSpan (const TimeSpan &copy)
 Overloaded constructor.
 
int16_t days () const
 return the number of days
 
int8_t hours () const
 return number of hours
 
int8_t minutes () const
 return number of minutes
 
int8_t seconds () const
 return number of seconds
 
int32_t totalseconds () const
 return total number of seconds
 
TimeSpan operator+ (const TimeSpan &right)
 redefine "+" operator
 
TimeSpan operator- (const TimeSpan &right)
 redefine "-" operator
 

Protected Attributes

int32_t _seconds
 Internal value for total seconds.
 

Detailed Description

Timespan class which can represent changes in time with seconds accuracy.

Copied from RTClib. For further information see https://github.com/Zanduino/MCP7940/wiki/TimeSpanClass for additional details


The documentation for this class was generated from the following files: