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

clawsoft::Chronometer Class Reference

#include <Chronometer.h>

Inheritance diagram for clawsoft::Chronometer:

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

Collaboration graph
[legend]

Detailed Description

This class deals with time counters.

STATUS: READY TO BE TESTED


Public Methods

 Chronometer ()
 Default constructor, it does nothing.

void start ()
 This will start the chronometer counter and will reset any previous counter value.

void stop ()
 This will stop the counter.

void resume ()
 If you stop the counter, this methid will resume the count.

void reset ()
 This will reset your counter without stoping it.

long int elapsedHour ()
 This will return the elapsed hours since you called start.

long int elapsedMinute ()
 This will return the elapsed munutes since you called start.

long int elapsedSecond ()
 This will return the elapsed second since you called start.

long int elapsedMillisecond ()
 This will return the elapsed millisecond since you called start.

long int elapsedMicrosecond ()
 This will return the elapsed microsecond since you called start.


Protected Methods

virtual int Hour ()
 Returns the current hour.

virtual int Minute ()
 Returns the current minute.

virtual int Second ()
 Returns the current second.

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

const Uint32 timestamp ()
 This will return the time as a Unix formatted timestamp counting the seconds from january 1st 1970.

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.


Constructor & Destructor Documentation

clawsoft::Chronometer::Chronometer  
 

Default constructor, it does nothing.


Member Function Documentation

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

This will return the CPU speed in megahertz.

long int clawsoft::Chronometer::elapsedHour  
 

This will return the elapsed hours since you called start.

long int clawsoft::Chronometer::elapsedMicrosecond  
 

This will return the elapsed microsecond since you called start.

long int clawsoft::Chronometer::elapsedMillisecond  
 

This will return the elapsed millisecond since you called start.

long int clawsoft::Chronometer::elapsedMinute  
 

This will return the elapsed munutes since you called start.

long int clawsoft::Chronometer::elapsedSecond  
 

This will return the elapsed second since you called start.

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::Time::Hour   [virtual, inherited]
 

Returns the current hour.

Reimplemented in clawsoft::Timestamp.

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

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

int clawsoft::Time::Minute   [virtual, inherited]
 

Returns the current minute.

Reimplemented in clawsoft::Timestamp.

void clawsoft::Chronometer::reset  
 

This will reset your counter without stoping it.

void clawsoft::Chronometer::resume  
 

If you stop the counter, this methid will resume the count.

int clawsoft::Time::Second   [virtual, inherited]
 

Returns the current second.

Reimplemented in clawsoft::Timestamp.

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.

void clawsoft::Chronometer::start  
 

This will start the chronometer counter and will reset any previous counter value.

void clawsoft::Chronometer::stop  
 

This will stop the counter.

const Uint32 clawsoft::Time::timestamp   [inherited]
 

This will return the time as a Unix formatted timestamp counting the seconds from january 1st 1970.

Reimplemented in clawsoft::Timestamp.

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