29.01.2011, 14:59
Here is your "normal" keys
Код:
#include <a_samp> #include <dfile> #include <Fini> #define TESZT 10000 public OnFilterScriptInit() { new string[20]; format(string,sizeof(string),"super dooper string"); dfile_Create("Dfile.txt"); dfile_Create("scriptfiles/Fini.txt"); new Dfile = GetTickCount(); dfile_Open("Dfile.txt"); print("\n\n\n"); print("Writing data:"); print("----------------------------"); for(new i=0;i<TESZT;i++) { dfile_WriteString("cessil", string); } dfile_SaveFile(); printf("[DFILE] writing time: %d", GetTickCount() - Dfile); new Fini = GetTickCount(); Fini_OpenFile("Fini.txt"); for(new i=0;i<TESZT;i++) { Fini_SetStr("cessil",string); } Fini_SaveFile(); Fini_CloseFile(); printf("[FINI] writing time: %d", GetTickCount() - Fini); printf("\n\n\n"); print("Reading data:"); print("----------------------------"); Dfile = GetTickCount(); dfile_Open("Dfile.txt"); new dfilevalue, finivalue; while(GetTickCount() - Dfile < 1000) { dfile_ReadString("cessil"); dfilevalue++; } dfile_CloseFile(); printf("[DFILE] reading time: %d", dfilevalue); Fini = GetTickCount(); Fini_OpenFile("Fini.txt"); while(GetTickCount() - Fini < 1000) { Fini_GetStr("cessil"); finivalue++; } Fini_CloseFile(); printf("[FINI] reading time: %d", finivalue); return true; }