Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Unified Diff: runtime/embedders/openglui/common/timer.cc

Issue 12186002: Canvas API. There are still a number of things to do: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/embedders/openglui/common/timer.h ('k') | runtime/embedders/openglui/common/vm_glue.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/embedders/openglui/common/timer.cc
===================================================================
--- runtime/embedders/openglui/common/timer.cc (revision 17737)
+++ runtime/embedders/openglui/common/timer.cc (working copy)
@@ -43,24 +43,24 @@
Timer::Timer() : elapsed_(0.0f), last_time_(0.0) {
}
-void Timer::reset() {
+void Timer::Reset() {
elapsed_ = 0.0f;
- last_time_ = now();
+ last_time_ = Now();
}
-void Timer::update() {
- double current = now();
+void Timer::Update() {
+ double current = Now();
elapsed_ = (current - last_time_);
last_time_ = current;
}
-double Timer::now() {
+double Timer::Now() {
timespec timeval;
clock_gettime(CLOCK_MONOTONIC, &timeval);
return timeval.tv_sec + (timeval.tv_nsec * NANO);
}
-float Timer::elapsed() {
+float Timer::Elapsed() {
return elapsed_;
}
« no previous file with comments | « runtime/embedders/openglui/common/timer.h ('k') | runtime/embedders/openglui/common/vm_glue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698