diff --git a/lab19/lab19/main.c b/lab19/lab19/main.c index 7fadd58..e0c451d 100644 --- a/lab19/lab19/main.c +++ b/lab19/lab19/main.c @@ -327,8 +327,8 @@ void createRandomBinFiles(int n, int size) { int main() { srand((unsigned int)time(NULL)); - time_t start; - time(&start); + + clock_t start = clock(); //saveRandomArray(); @@ -351,9 +351,9 @@ int main() { //task5(); - createRandomBinFiles(1, 1024*1024); + createRandomBinFiles(32, 32 * 1024); - printf_s("time = %.0lf seconds", difftime(time(NULL), start)); + printf_s("time = %.3lf seconds", (double)(clock() - start) / (double)CLOCKS_PER_SEC); return 0; } \ No newline at end of file diff --git a/lab19/lab19/randbin/bin0 b/lab19/lab19/randbin/bin0 index 4e4803e..a3a66fd 100644 Binary files a/lab19/lab19/randbin/bin0 and b/lab19/lab19/randbin/bin0 differ