Created
June 10, 2018 21:19
-
-
Save eXpl0it3r/2a7871abb79eca22daa3f94335fa5b1d to your computer and use it in GitHub Desktop.
Visual Studio - std::ftell performance issue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define _CRT_SECURE_NO_WARNINGS | |
#include <cstdio> | |
#include <chrono> | |
int main() | |
{ | |
using namespace std::chrono_literals; | |
auto f = std::fopen("test.dat", "rb"); | |
auto end = std::chrono::high_resolution_clock::now() + 10s; | |
while (std::chrono::high_resolution_clock::now() < end) | |
std::ftell(f); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment