Brandon Fictorie / Mbed 2 deprecated BF_Websocket

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

TimeStamp Class Reference

TimeStamp Class Reference

This class encapsulates a point in time - which means it will not change after it has been created. More...

#include <Time.h>

Public Member Functions

int getYear ()
int getMonth ()
int getDay ()
int getHour ()
int getMinute ()
int getSecond ()
int getDayOfWeek ()
 get the day of the week - monday is 0
int getDayOfYear ()
 TimeStamp (time_t unixTime)
 creates a new time stamp based on the UNIX time stamp (seconds since 1970)
bool isSame (TimeStamp *ts)
bool isBefore (TimeStamp *ts)
bool isAfter (TimeStamp *ts)

Friends

class Time

Detailed Description

This class encapsulates a point in time - which means it will not change after it has been created.

Definition at line 14 of file Time.h.


Constructor & Destructor Documentation

TimeStamp ( time_t  unixTime )

creates a new time stamp based on the UNIX time stamp (seconds since 1970)

Definition at line 81 of file Time.h.


Member Function Documentation

int getDay (  )

Returns:
the day-of-the-month of the time stamp

Definition at line 31 of file Time.h.

int getDayOfWeek (  )

get the day of the week - monday is 0

Returns:
the day-of-the-week of the time stamp

Definition at line 63 of file Time.h.

int getDayOfYear (  )
Returns:
the day-of-the-year of the time stamp

Definition at line 74 of file Time.h.

int getHour (  )
Returns:
the hour of the time stamp

Definition at line 41 of file Time.h.

int getMinute (  )
Returns:
the minute of the time stamp

Definition at line 48 of file Time.h.

int getMonth (  )
Returns:
the month of the time stamp

Definition at line 27 of file Time.h.

int getSecond (  )
Returns:
the second of the time stamp

Definition at line 55 of file Time.h.

int getYear (  )
Returns:
the year of the time stamp

Definition at line 20 of file Time.h.

bool isAfter ( TimeStamp ts )
Parameters:
tsthe time stamp to compare to
Returns:
true when the current time stamp is after the given time stamp

Definition at line 57 of file Time.cpp.

bool isBefore ( TimeStamp ts )
Parameters:
tsthe time stamp to compare to
Returns:
true when the current time stamp is before the given time stamp

Definition at line 31 of file Time.cpp.

bool isSame ( TimeStamp ts )
Parameters:
tsthe time stamp to compare to
Returns:
true when both timestamp are the same point in time

Definition at line 17 of file Time.cpp.