This timer sets up a periodic (default 10 minutes) reminder to give you a reality check of how long you've been working on something. I leave it on running almost all the time now.
P.S. I'm always looking for these little conceptually interesting (rather than... "efficient" or "elegant" or ever "practical") scripts, if anyone has any.
Code:
#SingleInstance, force
#Persistent
#NoEnv
Period = 10 ;The time, in minutes, of the period
SplashTextOn,200,25,,Timer Started
Sleep, 2000
SplashTextOff
Time_Elapsed = 0
SleepTime := Period*60000
SetTimer, DisplayTime, %SleepTime%
Return
DisplayTime:
Time_Elapsed += Period
Hours := Time_Elapsed // 60
Minutes := Mod(Time_Elapsed, 60)
If Hours
Display := Hours . " hour" . (Hours = 1 ? "" : "s") . " " . Minutes " minute" . (Minutes = 1 ? "" : "s")
else
Display := Minutes . " minute" . (Minutes = 1 ? "" : "s")
SplashTextOn,200,25,,%Display%
Sleep, 3000
SplashTextOff
Return