Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <IniFiles>
- #define TESTFILE "testdata.ini"
- #define TESTS 100
- main()
- {
- file_OS();
- print("- Creating Files");
- file_Create(TESTFILE);
- file_Open(TESTFILE);
- file_SetStr("TestKey", "Value");
- file_Save(TESTFILE);
- file_Close();
- new tick, var[256];
- print("- Starting Test");
- tick=GetTickCount();
- for(new i;i<TESTS;i++)
- {
- file_Open(TESTFILE);
- var = file_GetStr("TestKey");
- file_Close();
- }
- printf("Structured: %d - str: '%s'", GetTickCount()-tick, var);
- tick=GetTickCount();
- for(new i;i<TESTS;i++)
- {
- var = file_dGetStr(TESTFILE, "TestKey");
- }
- printf("Direct: %d - str: '%s'", GetTickCount()-tick, var);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement