mIRC Home    About    Download    Register    News    Help

Print Thread
#111709 18/02/05 07:09 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
I know I can set a timer to go off at a specific time or to go off after x seconds. If I set the timer for a specific time, to my knowledge, there's no way to show how much time is left before the timer goes off. Additionally, there have been times when I've wished I had, for lack of a better expression, a stopwatch option

#111710 18/02/05 12:48 PM
Joined: Feb 2005
Posts: 681
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
$timer().secs

/help $timer

#111711 20/02/05 11:12 AM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Yeah, no way to tell the time remaing for" <time> timers", not without a bit of scripting anyway.

Here's an alias that returns the time remaining in HH:nn:ss format.
Code:
; //echo -a $timeleft(timername)

alias timeleft {
  if !$timer($1) { return }
  var %a = $timer($1).time
  if !%a { return $duration($timer($1).secs),3) }
  if $remove(%a,:) &lt; $time(HHnn) { %a = $calc(($ctime($date %a)+86400)-$ctime) }
  else  %a = $ctime($date %a) - $ctime
  return $duration($calc(%a + $timer($1).secs),3)
}

#111712 21/02/05 02:15 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
That works for a timer that is set to go off after a set amount of time, but not if it's a timer set to go off at a specific time. I've tried it.

#111713 21/02/05 02:17 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Thanks Iori


Link Copied to Clipboard