Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <mfiles>
- main() {}
- public OnGameModeInit() {
- new file[] = "mFiles_test.ini", _str[20];
- if(!File_Exists(file)) File_Create(file);
- new initialTick, finalTick;
- initialTick = GetTickCount();
- File_Write(file);
- for(new i; i < 100; ++i) {
- format(_str, sizeof(_str), "String%d", i);
- File_WriteString(_str, "mFiles speed tests, this is the official test!");
- }
- File_WriteFinish(file);
- finalTick = GetTickCount();
- printf("writing: %d (ms)", finalTick-initialTick);
- new string[100];
- initialTick = GetTickCount();
- File_Open(file);
- for(new i; i < 100; ++i) {
- format(_str, sizeof(_str), "String%d", i);
- File_GetStringEx(_str, string);
- }
- finalTick = GetTickCount();
- printf("reading: %d (ms)", finalTick-initialTick);
- }
Advertisement
Add Comment
Please, Sign In to add comment