forked from localhorst/reHDD
select drive based on arrow keys
This commit is contained in:
32
src/wipe.cpp
32
src/wipe.cpp
@ -36,10 +36,10 @@ void Wipe::wipeDrive(Drive* drive)
|
||||
FILE* outputfileSmart = popen(cpComand, "r");
|
||||
|
||||
while ((getline(&cLine, &len, outputfileSmart)) != -1)
|
||||
{
|
||||
string sLine = string(cLine);
|
||||
cout << sLine;
|
||||
}
|
||||
{
|
||||
string sLine = string(cLine);
|
||||
cout << sLine;
|
||||
}
|
||||
fclose(outputfileSmart);
|
||||
|
||||
auto t_end = chrono::high_resolution_clock::now();
|
||||
@ -51,22 +51,22 @@ void Wipe::wipeDrive(Drive* drive)
|
||||
uint64_t u64seconds = 0U;
|
||||
|
||||
while(u64TimeMS >= 1000)
|
||||
{
|
||||
u64seconds++;
|
||||
u64TimeMS = u64TimeMS - 1000;
|
||||
}
|
||||
{
|
||||
u64seconds++;
|
||||
u64TimeMS = u64TimeMS - 1000;
|
||||
}
|
||||
|
||||
while(u64seconds >= 60)
|
||||
{
|
||||
u64minutes++;
|
||||
u64seconds = u64seconds - 60;
|
||||
}
|
||||
{
|
||||
u64minutes++;
|
||||
u64seconds = u64seconds - 60;
|
||||
}
|
||||
|
||||
while(u64minutes >= 60)
|
||||
{
|
||||
u64hours++;
|
||||
u64minutes = u64minutes - 60;
|
||||
}
|
||||
{
|
||||
u64hours++;
|
||||
u64minutes = u64minutes - 60;
|
||||
}
|
||||
|
||||
cout << "Elapsed time: " << u64hours << " h - " << u64minutes << " min - " << u64seconds << " sec" << endl;
|
||||
}
|
||||
|
Reference in New Issue
Block a user