-
Notifications
You must be signed in to change notification settings - Fork 0
/
Run.bat
120 lines (88 loc) · 2.69 KB
/
Run.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
@echo off
cd /d %~dp0
SET A=%TIME%
echo [CleanUpMain.do]
StataSE /e do ./Cleanup/DoFile/CleanUpMain.do
SET B=%TIME%
:: 取得時間詳細資料
SET A_HOUR=%A:~0,2%
SET A_MINS=%A:~3,2%
SET A_SECS=%A:~6,2%
SET A_MSEC=%A:~9,2%
SET B_HOUR=%B:~0,2%
SET B_MINS=%B:~3,2%
SET B_SECS=%B:~6,2%
SET B_MSEC=%B:~9,2%
:: 計算耗時
SET /A C_MSEC=B_MSEC-A_MSEC
SET /A C_SECS=B_SECS-A_SECS
SET /A C_MINS=B_MINS-A_MINS
SET /A C_HOUR=B_HOUR-A_HOUR
:: 調整數值
IF %C_MSEC% LSS 0 SET /A C_MSEC+=100 & SET /A C_SECS-=1
IF %C_MSEC% LSS 10 SET C_MSEC=0%C_MSEC%
IF %C_SECS% LSS 0 SET /A C_SECS+=60 & SET /A C_MINS-=1
IF %C_SECS% LSS 10 SET C_SECS=0%C_SECS%
IF %C_MINS% LSS 0 SET /A C_MINS+=60 & SET /A C_HOUR-=1
IF %C_MINS% LSS 10 SET C_MINS=0%C_MINS%
IF %C_HOUR% LSS 0 SET /A C_HOUR+=24
IF %C_HOUR% LSS 10 SET C_HOUR=0%C_HOUR%
echo Done. time used: %C_HOUR%:%C_MINS%:%C_SECS%.%C_MSEC%
echo ====================================================
echo [MergeMain.do]
StataSE /e do ./Merge/DoFile/MergeMain.do
SET B=%TIME%
:: 取得時間詳細資料
SET A_HOUR=%A:~0,2%
SET A_MINS=%A:~3,2%
SET A_SECS=%A:~6,2%
SET A_MSEC=%A:~9,2%
SET B_HOUR=%B:~0,2%
SET B_MINS=%B:~3,2%
SET B_SECS=%B:~6,2%
SET B_MSEC=%B:~9,2%
:: 計算耗時
SET /A C_MSEC=B_MSEC-A_MSEC
SET /A C_SECS=B_SECS-A_SECS
SET /A C_MINS=B_MINS-A_MINS
SET /A C_HOUR=B_HOUR-A_HOUR
:: 調整數值
IF %C_MSEC% LSS 0 SET /A C_MSEC+=100 & SET /A C_SECS-=1
IF %C_MSEC% LSS 10 SET C_MSEC=0%C_MSEC%
IF %C_SECS% LSS 0 SET /A C_SECS+=60 & SET /A C_MINS-=1
IF %C_SECS% LSS 10 SET C_SECS=0%C_SECS%
IF %C_MINS% LSS 0 SET /A C_MINS+=60 & SET /A C_HOUR-=1
IF %C_MINS% LSS 10 SET C_MINS=0%C_MINS%
IF %C_HOUR% LSS 0 SET /A C_HOUR+=24
IF %C_HOUR% LSS 10 SET C_HOUR=0%C_HOUR%
echo Done. time used: %C_HOUR%:%C_MINS%:%C_SECS%.%C_MSEC%
echo ====================================================
echo [TrendMain.do]
StataSE /e do ./Trend/DoFile/TrendMain.do
SET B=%TIME%
:: 取得時間詳細資料
SET A_HOUR=%A:~0,2%
SET A_MINS=%A:~3,2%
SET A_SECS=%A:~6,2%
SET A_MSEC=%A:~9,2%
SET B_HOUR=%B:~0,2%
SET B_MINS=%B:~3,2%
SET B_SECS=%B:~6,2%
SET B_MSEC=%B:~9,2%
:: 計算耗時
SET /A C_MSEC=B_MSEC-A_MSEC
SET /A C_SECS=B_SECS-A_SECS
SET /A C_MINS=B_MINS-A_MINS
SET /A C_HOUR=B_HOUR-A_HOUR
:: 調整數值
IF %C_MSEC% LSS 0 SET /A C_MSEC+=100 & SET /A C_SECS-=1
IF %C_MSEC% LSS 10 SET C_MSEC=0%C_MSEC%
IF %C_SECS% LSS 0 SET /A C_SECS+=60 & SET /A C_MINS-=1
IF %C_SECS% LSS 10 SET C_SECS=0%C_SECS%
IF %C_MINS% LSS 0 SET /A C_MINS+=60 & SET /A C_HOUR-=1
IF %C_MINS% LSS 10 SET C_MINS=0%C_MINS%
IF %C_HOUR% LSS 0 SET /A C_HOUR+=24
IF %C_HOUR% LSS 10 SET C_HOUR=0%C_HOUR%
echo Done. time used: %C_HOUR%:%C_MINS%:%C_SECS%.%C_MSEC%
echo ====================================================
pause