Code block - SetTimeOut is underfined

(Denis) #1

Guys, I am trying to use SetTimeOut function in the Code block but there’s an error saying that it’s underfined. That’s the technical problem I encountered.

var timeover = 0

function time() {
timeover = 1

setTimeout(time, 10000)

But actually I am trying to achieve this: after livechat is ended I need to check how much time the user hadn’t been active before he/she wrote again. <60 minutes - do 1 action. >60 minuntes - another.

Anybody know how else to achieve it?