Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <b_io> // http://pastebin.com/HhZmT4JV
- new const my_array[1000] = {0xFFFFFFFF, ...};
- public OnFilterScriptInit()
- {
- print("\n====================");
- print("= Some test script =");
- print("= Loaded =");
- print("====================\n");
- new a = GetTickCount(), b, BFile:file_handle = BIO::open("some_test_file.bin", b_io_mode_new);
- if(file_handle)
- {
- for(new i = 0; i < 1000000; i++) BIO::write_32_arr(file_handle, my_array); // <- Writing 1 mio times a huge array into a file ( 4 x 1000 x 1000000 = 4000000000 Bytes! Around 3.73 GB)
- BIO::close(file_handle);
- }
- b = GetTickCount();
- printf("The process took %d ms.", b-a); // It took me about 109 seconds
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("\n====================");
- print("= Some test script =");
- print("= Unloaded =");
- print("====================\n");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement