加入模板
This commit is contained in:
parent
ea7004d1db
commit
bf2198b25f
3
Template/Readme.md
Normal file
3
Template/Readme.md
Normal file
@ -0,0 +1,3 @@
|
||||
# 标题
|
||||
|
||||
* 内容
|
1
Template/doc/Readme.md
Normal file
1
Template/doc/Readme.md
Normal file
@ -0,0 +1 @@
|
||||
#
|
6
Template/main.cpp
Normal file
6
Template/main.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
int main()
|
||||
{
|
||||
|
||||
}
|
0
Template/test/in.txt
Normal file
0
Template/test/in.txt
Normal file
0
Template/test/in2.txt
Normal file
0
Template/test/in2.txt
Normal file
0
Template/test/in3.txt
Normal file
0
Template/test/in3.txt
Normal file
7
Template/test/out.txt
Normal file
7
Template/test/out.txt
Normal file
@ -0,0 +1,7 @@
|
||||
## z:\Chao\src\Template\test\in.txt
|
||||
2020/03/14 ÖÜÁù 11:41:28.68
|
||||
Hello Easy C++ project!
|
||||
|
||||
-----------------------------------------------
|
||||
Process exited after 200 ms with return value 0
|
||||
|
51
run.bat
Normal file
51
run.bat
Normal file
@ -0,0 +1,51 @@
|
||||
@echo off
|
||||
set t1=%time%
|
||||
|
||||
call:Process %1
|
||||
goto end
|
||||
|
||||
:Process
|
||||
for %%a in ("%1") do (
|
||||
set file_path=%%~dpa
|
||||
)
|
||||
echo %file_path%
|
||||
|
||||
cd . > %file_path%test\out.txt
|
||||
for %%i in ( %file_path%test\in*.txt) do (
|
||||
echo ## %%i >> %file_path%test\out.txt
|
||||
echo %date% %time% >> %file_path%test\out.txt
|
||||
call:time_start
|
||||
%1 < %%i >> %file_path%test\out.txt
|
||||
call:time_diff >> %file_path%test\out.txt
|
||||
)
|
||||
|
||||
goto:eof
|
||||
|
||||
:time_start
|
||||
set t1=%time%
|
||||
goto:eof
|
||||
|
||||
:time_diff
|
||||
set t2=%time%
|
||||
|
||||
set /a ms=1%t1:~9%*10 %% 1000
|
||||
set /a sec=1%t1:~6,2% %% 100
|
||||
set /a min=1%t1:~3,2% %% 100
|
||||
set /a hour=%t1:~0,-9%
|
||||
set /a time1 = %hour% * 3600000 + %min% * 60000 + %sec% * 1000 + %ms%
|
||||
|
||||
set /a ms=1%t2:~9%*10 %% 1000
|
||||
set /a sec=1%t2:~6,2% %% 100
|
||||
set /a min=1%t2:~3,2% %% 100
|
||||
set /a hour=%t2:~0,-9%
|
||||
set /a time2 = %hour% * 3600000 + %min% * 60000 + %sec% * 1000 + %ms%
|
||||
set /a time_dif = %time2% - %time1%
|
||||
|
||||
echo;
|
||||
echo -----------------------------------------------
|
||||
echo Process exited after %time_dif% ms with return value %ErrorLevel%
|
||||
echo;
|
||||
goto:eof
|
||||
|
||||
:end
|
||||
REM pause
|
Loading…
x
Reference in New Issue
Block a user