diff --git a/tests/line_test.cpp b/tests/line_test.cpp index 947f95d744705..754d6b0fe49c8 100644 --- a/tests/line_test.cpp +++ b/tests/line_test.cpp @@ -1,3 +1,4 @@ +#include #include #include #include @@ -332,14 +333,14 @@ static void line_to_comparison( const int iterations ) const auto end2 = std::chrono::high_resolution_clock::now(); if( iterations > 1 ) { - const int64_t diff1 = + const long long diff1 = std::chrono::duration_cast( end1 - start1 ).count(); - const int64_t diff2 = + const long long diff2 = std::chrono::duration_cast( end2 - start2 ).count(); - printf( "line_to() executed %d times in %ld microseconds.\n", + printf( "line_to() executed %d times in %lld microseconds.\n", iterations, diff1 ); - printf( "canonical_line_to() executed %d times in %ld microseconds.\n", + printf( "canonical_line_to() executed %d times in %lld microseconds.\n", iterations, diff2 ); } } diff --git a/tests/map_memory.cpp b/tests/map_memory.cpp index 77b054b701aaf..e8ad59d21d7a1 100644 --- a/tests/map_memory.cpp +++ b/tests/map_memory.cpp @@ -102,9 +102,9 @@ TEST_CASE( "lru_cache_perf", "[.]" ) } } const auto end1 = std::chrono::high_resolution_clock::now(); - const int64_t diff1 = std::chrono::duration_cast - ( end1 - start1 ).count(); - printf( "completed %d insertions in %ld microseconds.\n", max_size, diff1 ); + const long long diff1 = std::chrono::duration_cast + ( end1 - start1 ).count(); + printf( "completed %d insertions in %lld microseconds.\n", max_size, diff1 ); /* * Original tripoint hash completed 1000000 insertions in 96136925 microseconds. * Table based interleave v1 completed 1000000 insertions in 41435604 microseconds. diff --git a/tests/shadowcasting_test.cpp b/tests/shadowcasting_test.cpp index 2ae3c5005d2f6..6571c6cf94084 100644 --- a/tests/shadowcasting_test.cpp +++ b/tests/shadowcasting_test.cpp @@ -256,13 +256,13 @@ static void shadowcasting_runoff( const int iterations, const bool test_bresenha const auto end2 = std::chrono::high_resolution_clock::now(); if( iterations > 1 ) { - const int64_t diff1 = std::chrono::duration_cast - ( end1 - start1 ).count(); - const int64_t diff2 = std::chrono::duration_cast - ( end2 - start2 ).count(); - printf( "oldCastLight() executed %d times in %ld microseconds.\n", + const long long diff1 = std::chrono::duration_cast + ( end1 - start1 ).count(); + const long long diff2 = std::chrono::duration_cast + ( end2 - start2 ).count(); + printf( "oldCastLight() executed %d times in %lld microseconds.\n", iterations, diff1 ); - printf( "castLight() executed %d times in %ld microseconds.\n", + printf( "castLight() executed %d times in %lld microseconds.\n", iterations, diff2 ); } @@ -318,15 +318,15 @@ static void shadowcasting_float_quad( const auto end2 = std::chrono::high_resolution_clock::now(); if( iterations > 1 ) { - const int64_t diff1 = std::chrono::duration_cast - ( end1 - start1 ).count(); - const int64_t diff2 = std::chrono::duration_cast - ( end2 - start2 ).count(); + const long long diff1 = std::chrono::duration_cast + ( end1 - start1 ).count(); + const long long diff2 = std::chrono::duration_cast + ( end2 - start2 ).count(); printf( "castLight on four_quadrants (denominator %u) " - "executed %d times in %ld microseconds.\n", + "executed %d times in %lld microseconds.\n", denominator, iterations, diff1 ); printf( "castLight on floats (denominator %u) " - "executed %d times in %ld microseconds.\n", + "executed %d times in %lld microseconds.\n", denominator, iterations, diff2 ); } @@ -383,13 +383,13 @@ static void shadowcasting_3d_2d( const int iterations ) const auto end2 = std::chrono::high_resolution_clock::now(); if( iterations > 1 ) { - const int64_t diff1 = + const long long diff1 = std::chrono::duration_cast( end1 - start1 ).count(); - const int64_t diff2 = + const long long diff2 = std::chrono::duration_cast( end2 - start2 ).count(); - printf( "castLight() executed %d times in %ld microseconds.\n", + printf( "castLight() executed %d times in %lld microseconds.\n", iterations, diff1 ); - printf( "cast_zlight() executed %d times in %ld microseconds.\n", + printf( "cast_zlight() executed %d times in %lld microseconds.\n", iterations, diff2 ); printf( "new/old execution time ratio: %.02f.\n", static_cast( diff2 ) / diff1 ); }