I was expecting someone more experienced to do this for you. But I'll give it a shot.

What this code will do is every time your ops will join the channel, it'll start a timer adding a second counter to an ini file on your computer. You can read this file to see how many seconds they've spent later on.

Code:
alias add.sec {
  writeini -n Optimes.ini $1 Seconds $calc($readini(Optimes.ini,$1,Seconds) + 5)
}

on *:text:!optime*:#: { 
  if ($2 == $null) { msg # $nick has spent $readini(Optimes.ini,$nick,Seconds) seconds as an op. | return }
  else { msg # $2 has spent $readini(Optimes.ini,$2,Seconds) seconds as an op. }
}

on *:join:#: 
if ($istok(%ops,$nick,32)) $+(.timersec.,$nick) 0 5 add.sec $nick

on *:text:*:#: { 
  if ($nick !isop #) return
  if ($istok(%ops,$nick,32)) return
  set %ops $addtok(%ops,$nick,32)
}

on *:part:#: { 
  $+(.timersec.,$nick) off
}


It's untested but should work the way you want it to. If you want to you can start the timers differently, I just put it so when an op types in the chat he'll be put in the variable.
Note, this will only start the timer when they join, so if you put in the script, no timers will be started until you receive the notification that they have joined the channel.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net