-

   rss_forum_sources_ru

 - e-mail

 

 -

 LiveInternet.ru:
: 29.07.2007
:
:
: 80

:


wofstream Windows 10

, 28 2020 . 09:21 +
a_n_y_a: SSD WDS500G3X0C-00SJG0 (465 )
. 20
SSD Windows 10, 2 /.
:
= 1228
= 827
? .

:
    #include "stdafx.h"
    #include "PrecisionTimer.h"
    #include
    #include
    #include
    using namespace std;
    int main()
    {
    wstring Im = _T("C:\TestSkorost.bin");
    wstring ImR = _T(".txt");
    int i;
    std::locale Loc = std::locale::global(std::locale("russian"));
    __int64 DlNew = 1024; DlNew = DlNew * 1024; DlNew = DlNew * 1024; DlNew = DlNew * 20;
    char *buf = NULL;
    try { buf = new char[DlNew]; }
    catch (...) { wcout << _T(" . :"); wcin >> i; return 0; };
    wcout << _T(" :\n");
    ofstream os(Im, std::ios::binary);
    if (!os){wcout<< _T(" : C:\TestSkorost.bin ."); wcin >> i; return 0;};
    CPrecisionTimer p; p.Start();
    double tnw = p.GetMsCurrentTime();
    os.write(buf, DlNew);
    double tkw = p.GetMsCurrentTime();
    os.close();
    ifstream is(Im, std::ios::binary);
    if (!is) { wcout << _T(" :C:\TestSkorost.bin "); wcin >> i; return 0;};
    double tnr = p.GetMsCurrentTime();
    is.read(buf, DlNew);
    double tkr = p.GetMsCurrentTime();
    is.close();
    delete[] buf;
    double Tr = (tkr - tnr), Tw = tkw - tnw;
    double SkorR = (DlNew / Tr) / 1000, SkorW = (DlNew / Tw) / 1000;
    wofstream osR(ImR);
    if (!osR) { wcout << _T(" :'.txt' ."); wcin >> i; return 0; };
    osR << _T(" = ") << (int)SkorR << _T(" \n") << _T(" = ") << (int)SkorW << _T(" ");
    osR.close();
    wcout<<_T(" , :");
    wcin >> i;
    return 0;
    }

SkorostReadWriteSSD.rar (, : 2)

https://forum.sources.ru/index.php?showtopic=421051&view=findpost&p=3843188

:  

: [1] []
 

:
: 

: ( )

:

  URL