change some timing types from int to uint64_t to avoid costly assumptions

This commit is contained in:
Stephen Birarda 2013-07-11 10:09:00 -07:00
parent 4ed231670f
commit beb89e3d2b
2 changed files with 2 additions and 2 deletions

View file

@ -646,7 +646,7 @@ void* animateVoxels(void* args) {
}
uint64_t end = usecTimestampNow();
int elapsedSeconds = (end - ::start) / 1000000;
uint64_t elapsedSeconds = (end - ::start) / 1000000;
if (::shouldShowPacketsPerSecond) {
printf("packetsSent=%ld, bytesSent=%ld pps=%f bps=%f\n",packetsSent,bytesSent,
(float)(packetsSent/elapsedSeconds),(float)(bytesSent/elapsedSeconds));

View file

@ -177,7 +177,7 @@ void VoxelSystem::setupNewVoxelsForDrawing() {
return; // bail early, it hasn't been long enough since the last time we ran
}
int sinceLastViewCulling = (start - _lastViewCulling) / 1000;
uint64_t sinceLastViewCulling = (start - _lastViewCulling) / 1000;
// If the view frustum is no longer changing, but has changed, since last time, then remove nodes that are out of view
if ((sinceLastViewCulling >= std::max((float) _lastViewCullingElapsed, VIEW_CULLING_RATE_IN_MILLISECONDS))
&& !isViewChanging() && hasViewChanged()) {