Main Page   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields  

clawsoft::Timestamp Class Reference

#include <Timestamp.h>

Inheritance diagram for clawsoft::Timestamp:

Inheritance graph
[legend]
Collaboration diagram for clawsoft::Timestamp:

Collaboration graph
[legend]

Detailed Description

This class implements the Timestamp functionality, it will store the timestamp the first time it is instanciated.


Public Methods

int Hour ()
 Returns the current hour.

int Minute ()
 Returns the current minute.

int Second ()
 Returns the current second.

Uint32 timestamp ()
 Returns the current timestamp as unix time.

const StringtoString ()
 Returns time in the following format: HH:MM:SS.


Protected Methods

virtual time_t getCurrentTime ()
 This method will update the value of unixtime and all the other broken-time values.

const Uint32 unixTime ()
 This methid will give you the numeric representation of the date in the unix time format.

void setClassName (const char *n)
 Call this method when you need to set the name of the class you're creating, typically in it's constructor, remember that you must set the classname for every class you create, that way you can have more information while debugging.

const char * getClassName ()
 Returns the name of the current class.


Static Protected Methods

int installedCPUs ()
 This will return how many CPUs are installed in the system.

double cpuSpeed ()
 This will return the CPU speed in megahertz.

int totalMemory ()
 Will return the total amount of system memory.

int freeMemory ()
 Will return the total amount of free system memory.

void usleep (Uint32 usec)
 Will freeze the software for usec microseconds.


Protected Attributes

time_t unixtime
 This variable stores the time queried by getCurrentTime();.

String drep
 This member holds the String representation of the current Date.

int hour
 This member stores the hour 0-23.

int hr12hour
 This member will show the hour using non-24hr format.

int minute
 This member stores the minute 0-59.

int second
 This member stores the second 0-59.

int dayofweek
 This member stores the day of the week e.g Monday, Tuesday, Wednesday...

int dayofyear
 This member stores the days elapsed since january first of the current year.

int dayofmonth
 This member stores the day of the month 1-31.

int month
 This member stores the month 1-12.

int year
 This member stores the year 1960 - ????

int hr12ampm
 This member knows whether the timing is AM or PM.


Member Function Documentation

double clawsoft::System::cpuSpeed   [static, inherited]
 

This will return the CPU speed in megahertz.

int clawsoft::System::freeMemory   [static, inherited]
 

Will return the total amount of free system memory.

const char * clawsoft::Object::getClassName   [inherited]
 

Returns the name of the current class.

time_t clawsoft::Date::getCurrentTime   [virtual, inherited]
 

This method will update the value of unixtime and all the other broken-time values.

int clawsoft::Timestamp::Hour   [virtual]
 

Returns the current hour.

Reimplemented from clawsoft::Time.

int clawsoft::System::installedCPUs   [static, inherited]
 

This will return how many CPUs are installed in the system.

int clawsoft::Timestamp::Minute   [virtual]
 

Returns the current minute.

Reimplemented from clawsoft::Time.

int clawsoft::Timestamp::Second   [virtual]
 

Returns the current second.

Reimplemented from clawsoft::Time.

void clawsoft::Object::setClassName const char *    n [protected, inherited]
 

Call this method when you need to set the name of the class you're creating, typically in it's constructor, remember that you must set the classname for every class you create, that way you can have more information while debugging.

Uint32 clawsoft::Timestamp::timestamp  
 

Returns the current timestamp as unix time.

Reimplemented from clawsoft::Time.

const String & clawsoft::Time::toString   [virtual, inherited]
 

Returns time in the following format: HH:MM:SS.

Reimplemented from clawsoft::Date.

int clawsoft::System::totalMemory   [static, inherited]
 

Will return the total amount of system memory.

const Uint32 clawsoft::Date::unixTime   [inherited]
 

This methid will give you the numeric representation of the date in the unix time format.

void clawsoft::System::usleep Uint32    usec [static, inherited]
 

Will freeze the software for usec microseconds.


Field Documentation

int clawsoft::Date::dayofmonth [inherited]
 

This member stores the day of the month 1-31.

int clawsoft::Date::dayofweek [inherited]
 

This member stores the day of the week e.g Monday, Tuesday, Wednesday...

int clawsoft::Date::dayofyear [inherited]
 

This member stores the days elapsed since january first of the current year.

String clawsoft::Date::drep [protected, inherited]
 

This member holds the String representation of the current Date.

int clawsoft::Date::hour [inherited]
 

This member stores the hour 0-23.

int clawsoft::Date::hr12ampm [inherited]
 

This member knows whether the timing is AM or PM.

int clawsoft::Date::hr12hour [inherited]
 

This member will show the hour using non-24hr format.

int clawsoft::Date::minute [inherited]
 

This member stores the minute 0-59.

int clawsoft::Date::month [inherited]
 

This member stores the month 1-12.

int clawsoft::Date::second [inherited]
 

This member stores the second 0-59.

time_t clawsoft::Date::unixtime [protected, inherited]
 

This variable stores the time queried by getCurrentTime();.

int clawsoft::Date::year [inherited]
 

This member stores the year 1960 - ????


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

Authors:

Juan V. Guerrero
Jannette C. Mejia
Juan C. Guevara

Powered by:

SourceForgeLogo