@echo off
title ��ʱ�ػ��ű� - �賿4���Զ��ػ�
:: ��������賿4�㻹�ж�����
for /f "tokens=1-3 delims=:." %%a in ("%time%") do (
set /a now_h=%%a
set /a now_m=%%b
set /a now_s=%%c
)
:: ����Сʱ����ȥ��ǰ���㣬����08���8��
set /a now_h=10%now_h% %% 100
:: ���㵱ǰ������
set /a now_total=%now_h%*3600 + %now_m%*60 + %now_s%
:: Ŀ���賿4�� = 4*3600 = 14400 ��
:: �����ǰʱ�䳬���賿4�㣬��˳�ӵ������賿4��
if %now_total% lss 14400 (
set /a wait_seconds=14400 - %now_total%
) else (
set /a wait_seconds=86400 - %now_total% + 14400
)
echo ��ǰʱ��: %time%
echo Ŀ��ʱ��: 04:00:00
echo ����ȴ� %wait_seconds% �루Լ %wait_seconds%/3600 Сʱ��
echo.
echo ���ڵȴ�... �ڼ�ɰ� Ctrl+C ȡ��
echo.
:: �ȴ����賿4��
timeout /t %wait_seconds% /nobreak >nul
echo.
echo ʱ�䵽������ǿ�ƹر� LM Studio...
taskkill /im "LM Studio.exe" /f 2>nul
echo �ȴ�3���ػ�...
timeout /t 3 /nobreak >nul
echo ִ�йػ�...
shutdown /s /t 0