DOS 명령문으로 DOS 창의 Line Command 상태에서 시스템의 시간을 읽고 화면 표시가 가능하다.
이 기능을 이용하면 프로그램 개발 시 많은 시간이 소요되는 컴파일이나 매우 큰 데이터의 변환 시에 소요되는 시간을 작업종료와 함께 화면에 표시를 할 수가 있다.
@echo off
SETLOCAL
For /f "tokens=1-3 delims=1234567890 " %%a in ("%time%") Do set "delims=%%a%%b%%c"
For /f "tokens=1-4 delims=%delims%" %%G in ("%time%") Do (
Set _hh=%%G
Set _min=%%H
Set _ss=%%I
Set _ms=%%J
)
:: Strip any leading spaces
Set _hh=%_hh: =%
:: Ensure the hours have a leading zero
if 1%_hh% LSS 20 Set _hh=0%_hh%
Echo The time is: %_hh%:%_min%:%_ss%
ENDLOCAL&Set _time=%_hh%:%_min%
'Tools & Tip' 카테고리의 다른 글
SWISS Style Color Picker (0) | 2018.04.09 |
---|---|
GPSmapEdit에서 사용자 정의 라벨만들기 (0) | 2018.04.02 |
컬러픽커 (Color Picker) (0) | 2018.04.02 |
한글 구글지도 표시하기 (0) | 2018.03.18 |