mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 15:50:37 +02:00
change some timing types from int to uint64_t to avoid costly assumptions
This commit is contained in:
parent
4ed231670f
commit
beb89e3d2b
2 changed files with 2 additions and 2 deletions
|
@ -646,7 +646,7 @@ void* animateVoxels(void* args) {
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t end = usecTimestampNow();
|
uint64_t end = usecTimestampNow();
|
||||||
int elapsedSeconds = (end - ::start) / 1000000;
|
uint64_t elapsedSeconds = (end - ::start) / 1000000;
|
||||||
if (::shouldShowPacketsPerSecond) {
|
if (::shouldShowPacketsPerSecond) {
|
||||||
printf("packetsSent=%ld, bytesSent=%ld pps=%f bps=%f\n",packetsSent,bytesSent,
|
printf("packetsSent=%ld, bytesSent=%ld pps=%f bps=%f\n",packetsSent,bytesSent,
|
||||||
(float)(packetsSent/elapsedSeconds),(float)(bytesSent/elapsedSeconds));
|
(float)(packetsSent/elapsedSeconds),(float)(bytesSent/elapsedSeconds));
|
||||||
|
|
|
@ -177,7 +177,7 @@ void VoxelSystem::setupNewVoxelsForDrawing() {
|
||||||
return; // bail early, it hasn't been long enough since the last time we ran
|
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 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))
|
if ((sinceLastViewCulling >= std::max((float) _lastViewCullingElapsed, VIEW_CULLING_RATE_IN_MILLISECONDS))
|
||||||
&& !isViewChanging() && hasViewChanged()) {
|
&& !isViewChanging() && hasViewChanged()) {
|
||||||
|
|
Loading…
Reference in a new issue