[Include] dFile
#27

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;
}
Reply


Messages In This Thread
dFile - by Drake1994 - 29.01.2011, 11:43
Re: dFile - by SlashPT - 29.01.2011, 11:51
Re: dFile - by Fool - 29.01.2011, 12:03
Re: dFile - by Zh3r0 - 29.01.2011, 12:15
Re: dFile - by Drake1994 - 29.01.2011, 12:18
Re: dFile - by Zh3r0 - 29.01.2011, 12:20
Re: dFile - by iMonk3y - 29.01.2011, 12:22
Re: dFile - by SlashPT - 29.01.2011, 12:26
Re: dFile - by [03]Garsino - 29.01.2011, 13:12
Respuesta: dFile - by ipsBruno - 29.01.2011, 13:14
Re: dFile - by iMonk3y - 29.01.2011, 13:27
Re: dFile - by Drake1994 - 29.01.2011, 13:31
Respuesta: dFile - by ipsBruno - 29.01.2011, 13:35
Re: dFile - by [03]Garsino - 29.01.2011, 13:36
Respuesta: dFile - by ipsBruno - 29.01.2011, 13:50
Re: dFile - by Drake1994 - 29.01.2011, 14:03
Respuesta: dFile - by luis_lpv_22 - 29.01.2011, 14:09
Respuesta: dFile - by ipsBruno - 29.01.2011, 14:15
Re: dFile - by [03]Garsino - 29.01.2011, 14:27
Re: dFile - by Drake1994 - 29.01.2011, 14:35
Respuesta: dFile - by ipsBruno - 29.01.2011, 14:41
Re: dFile - by [03]Garsino - 29.01.2011, 14:44
Re: dFile - by Drake1994 - 29.01.2011, 14:45
Re: dFile - by [03]Garsino - 29.01.2011, 14:50
Respuesta: dFile - by ipsBruno - 29.01.2011, 14:50
Re: dFile - by Lorenc_ - 29.01.2011, 14:53
Re: dFile - by Drake1994 - 29.01.2011, 14:59
Re: dFile - by Hal - 29.01.2011, 15:12
Re: dFile - by Drake1994 - 29.01.2011, 15:15
Respuesta: dFile - by ipsBruno - 29.01.2011, 15:57

Forum Jump:


Users browsing this thread: 1 Guest(s)