// TimeStamp is used for recording when an event took place. class TimeStamp { private:
jlong _counter; public:
TimeStamp() { _counter = 0; } // has the timestamp been updated since being created or cleared? bool is_updated() const { return _counter != 0; } // update to current elapsed time void update(); // update to given elapsed time void update_to(jlong ticks); // returns seconds since updated // (must not be in a cleared state: must have been previously updated) double seconds() const;
jlong milliseconds() const; // ticks elapsed between VM start and last update
jlong ticks() const { return _counter; } // ticks elapsed since last update
jlong ticks_since_update() const;
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.