#include <Chronometer.h>
Inheritance diagram for clawsoft::Chronometer:
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 String & | toString () |
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. |
|
Default constructor, it does nothing.
|
|
This will return the CPU speed in megahertz.
|
|
This will return the elapsed hours since you called start.
|
|
This will return the elapsed microsecond since you called start.
|
|
This will return the elapsed millisecond since you called start.
|
|
This will return the elapsed munutes since you called start.
|
|
This will return the elapsed second since you called start.
|
|
Will return the total amount of free system memory.
|
|
Returns the name of the current class.
|
|
This method will update the value of unixtime and all the other broken-time values.
|
|
Returns the current hour.
Reimplemented in clawsoft::Timestamp. |
|
This will return how many CPUs are installed in the system.
|
|
Returns the current minute.
Reimplemented in clawsoft::Timestamp. |
|
This will reset your counter without stoping it.
|
|
If you stop the counter, this methid will resume the count.
|
|
Returns the current second.
Reimplemented in clawsoft::Timestamp. |
|
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.
|
|
This will start the chronometer counter and will reset any previous counter value.
|
|
This will stop the counter.
|
|
This will return the time as a Unix formatted timestamp counting the seconds from january 1st 1970.
Reimplemented in clawsoft::Timestamp. |
|
Returns time in the following format: HH:MM:SS.
Reimplemented from clawsoft::Date. |
|
Will return the total amount of system memory.
|
|
This methid will give you the numeric representation of the date in the unix time format.
|
|
Will freeze the software for usec microseconds.
|
|
This member stores the day of the month 1-31.
|
|
This member stores the day of the week e.g Monday, Tuesday, Wednesday...
|
|
This member stores the days elapsed since january first of the current year.
|
|
This member holds the String representation of the current Date.
|
|
This member stores the hour 0-23.
|
|
This member knows whether the timing is AM or PM.
|
|
This member will show the hour using non-24hr format.
|
|
This member stores the minute 0-59.
|
|
This member stores the month 1-12.
|
|
This member stores the second 0-59.
|
|
This variable stores the time queried by getCurrentTime();.
|
|
This member stores the year 1960 - ????
|
Authors:
Juan V. Guerrero
Jannette C. Mejia
Juan C. Guevara
Powered by: