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

Unified Diff: experimental/flocking_geese/nacl_app/frame_counter.cc

Issue 10928195: First round of dead file removal (Closed) Base URL: https://github.com/samclegg/nativeclient-sdk.git@master
Patch Set: Created 8 years, 3 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 | « experimental/flocking_geese/nacl_app/frame_counter.h ('k') | experimental/flocking_geese/nacl_app/goose.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/flocking_geese/nacl_app/frame_counter.cc
diff --git a/experimental/flocking_geese/nacl_app/frame_counter.cc b/experimental/flocking_geese/nacl_app/frame_counter.cc
deleted file mode 100644
index 61e129e0d6d82727ab333989f7dc2dd18221c1e3..0000000000000000000000000000000000000000
--- a/experimental/flocking_geese/nacl_app/frame_counter.cc
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) 2011 The Native Client Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "nacl_app/flock.h"
-
-#include <time.h>
-#include <limits>
-
-void FrameCounter::BeginFrame() {
- struct timeval start_time;
- gettimeofday(&start_time, NULL);
- frame_start_ = start_time.tv_sec * kMicroSecondsPerSecond +
- start_time.tv_usec;
-}
-
-void FrameCounter::EndFrame() {
- struct timeval end_time;
- gettimeofday(&end_time, NULL);
- double frame_end = end_time.tv_sec * kMicroSecondsPerSecond +
- end_time.tv_usec;
- double dt = frame_end - frame_start_;
- if (dt < 0)
- return;
- frame_duration_accumulator_ += dt;
- frame_count_++;
- if (frame_count_ > kFrameRateRefreshCount ||
- frame_duration_accumulator_ >= kMicroSecondsPerSecond) {
- double elapsed_time = frame_duration_accumulator_ /
- kMicroSecondsPerSecond;
- if (fabs(elapsed_time) > std::numeric_limits<double>::epsilon()) {
- frames_per_second_ = frame_count_ / elapsed_time;
- }
- frame_duration_accumulator_ = 0;
- frame_count_ = 0;
- }
-}
-
-void FrameCounter::Reset() {
- frames_per_second_ = 0;
- frame_duration_accumulator_ = 0;
- frame_count_ = 0;
-}
« no previous file with comments | « experimental/flocking_geese/nacl_app/frame_counter.h ('k') | experimental/flocking_geese/nacl_app/goose.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698