GreenCloud Simulator
Public Member Functions | Protected Attributes | List of all members
ByteCounter Class Reference

#include <bytecounter.h>

Inheritance diagram for ByteCounter:
Inheritance graph
[legend]

Public Member Functions

 ByteCounter ()
 
virtual ~ByteCounter ()
 
int resetBytesSince ()
 
double getLastBytesSinceTime ()
 

Protected Attributes

int bytes_since_
 
double last_bytes_since_
 

Detailed Description

Definition at line 13 of file bytecounter.h.

Constructor & Destructor Documentation

ByteCounter::ByteCounter ( )

Definition at line 10 of file bytecounter.cc.

10  {
12 
13 }
int resetBytesSince()
Definition: bytecounter.cc:19
ByteCounter::~ByteCounter ( )
virtual

Definition at line 15 of file bytecounter.cc.

15  {
16 
17 }

Member Function Documentation

double ByteCounter::getLastBytesSinceTime ( )

Returns the time of the last check.

Definition at line 26 of file bytecounter.cc.

26  {
27  return last_bytes_since_;
28 }
double last_bytes_since_
Definition: bytecounter.h:27
int ByteCounter::resetBytesSince ( )

Returns the value of bytes since last check.

Definition at line 19 of file bytecounter.cc.

19  {
20  int result = this->bytes_since_;
21  this->bytes_since_ = 0;
22  this->last_bytes_since_=Scheduler::instance().clock();
23  return result;
24 }
double last_bytes_since_
Definition: bytecounter.h:27
int bytes_since_
Definition: bytecounter.h:26

Member Data Documentation

int ByteCounter::bytes_since_
protected

Definition at line 26 of file bytecounter.h.

double ByteCounter::last_bytes_since_
protected

Definition at line 27 of file bytecounter.h.


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